After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 149270 - gnome-score doesn't handle blank real name fields in the passwd file properly (patch included).
gnome-score doesn't handle blank real name fields in the passwd file properly...
Status: RESOLVED FIXED
Product: libgnome
Classification: Deprecated
Component: general
2.7.x
Other Linux
: Normal normal
: ---
Assigned To: libgnome maintainer
libgnome maintainer
Depends on:
Blocks: 149204
 
 
Reported: 2004-08-04 10:18 UTC by Callum McKenzie
Modified: 2005-01-25 12:20 UTC
See Also:
GNOME target: ---
GNOME version: 2.7/2.8


Attachments
Patch to detect the use of an "Unknown" user name and do something saner. (694 bytes, patch)
2004-08-04 10:19 UTC, Callum McKenzie
committed Details | Review

Description Callum McKenzie 2004-08-04 10:18:28 UTC
Play gnomine as a user with no real name field in /etc/passwd. Get a high score
and Unknown appears rather than falling back to the user name.

This is the result of the code expecting g_get_real_name () to return NULL,
instead it returns the string "Unknown" and has since about 1999. The attached
patch fixes this by explicitly looking for the string "Unknown" and subsituting
the user name instead.

For more details see bugs #149204 and #143552.

The use of a hard-coded (and untranslated) string is a little bad, but since I
intend moving this functionality into gnome-games in the 2.9 time-frame this
shouldn't matter. I also get the impression the glib maintainer isn't going to
change the string anytime soon.

Can I commit the patch ?
Comment 1 Callum McKenzie 2004-08-04 10:19:33 UTC
Created attachment 30198 [details] [review]
Patch to detect the use of an "Unknown" user name and do something saner.
Comment 2 Richard Hoelscher 2004-11-18 02:57:20 UTC
For what it's worth, in CVS on November 12th, libgnome's gnome-score was marked 
deprecated...
Comment 3 Kjartan Maraas 2005-01-24 16:38:37 UTC
Is this important enough to make an effort to get it in for 2.10?
Comment 4 Callum McKenzie 2005-01-25 06:48:16 UTC
Probably. We haven't replaced the problem code at the gnome-games end (we should
do, but it won't happen for 2.10) and some distributions (gentoo at least) have
stopped filling in the real name field so the user experience is bad. We have
had multiple bugs filed about this.
Comment 5 Kjartan Maraas 2005-01-25 12:20:31 UTC
Comment on attachment 30198 [details] [review]
Patch to detect the use of an "Unknown" user name and do something saner.

Commited on both branches.