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 149204 - 'Unknown' username in scoreboards
'Unknown' username in scoreboards
Status: RESOLVED FIXED
Product: gnome-games-superseded
Classification: Deprecated
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: GNOME Games maintainers
GNOME Games maintainers
: 151181 306922 (view as bug list)
Depends on: 149270
Blocks:
 
 
Reported: 2004-08-03 19:25 UTC by Lars Willemsens
Modified: 2005-06-09 00:29 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Lars Willemsens 2004-08-03 19:25:58 UTC
Description of Problem:
Whenever I have a top ten score for ANY gnome
game, the user of the new score is determined to
be 'Unknown'.
This problem has always been there, so all the
high-score tables contain only 'Unknown' users.
This problem is the same for each user on my machine.
The .scores files are writeable, there's no
problem there. Also, the .scores files are loaded
correctly by each game.


Steps to reproduce the problem:
1. Break a score ;-)
Seriously though, I wouldn't know how anyone else
can reproduce this.

Actual Results:
User is written to highscore table as 'Unknown'.
Other values, such as the score itself and the
date, are correct.

Expected Results:
Username is used when writing to highscores.


How often does this happen?
Always, for every user.


Additional Information:
gnome version: 2.6
gnome-games version: 2.6.0.1
uname -a: Linux localhost 2.6.5-gentoo #1 Sat Apr
10 12:27:34 CEST 2004 i686 AMD Athlon(tm)
Processor AuthenticAMD GNU/Linux
distribution: Gentoo (mostly up-to-date)
Comment 1 Callum McKenzie 2004-08-03 22:41:55 UTC
This sounds like a problem resolving user names.

Could you attach a copy of a high scores file ? This should tell me if the
problem occurs when writing the file or when reading it. i.e. whether garbage is
being written to the file or valid data is being misinterpreted. Also, have you
done anything unusual with pam or any of the other stuff that affects ? Could
you attach a copy of /etc/nsswitch.conf ? (This will tell me how username
lookups are being done.)

I should also say that this will technically be a libgnome bug, but since that
code is going to be moved into gnome-games in 2.9 it had better be my bug :).
Comment 2 Allison Karlitskaya (desrt) 2004-08-03 23:50:57 UTC
I have this problem too.  I always assumed it was a feature so that your boss
couldn't tell who was wasting all their time playing tetris :)

Looking into it.
Comment 3 Allison Karlitskaya (desrt) 2004-08-04 00:00:34 UTC
OK.


For me, this problem is caused by the fact that I have no fullname set in my
password file.  Once I set one it started working.

Maybe the games should fall back on using your login name if no fullname is
available?  I'm actually of the mind that they should just always use your login
name (as fullname can be spoofed).

Although... why you'd want to spoof highscores for other people is sort of an
odd question.....
Comment 4 Richard Hoelscher 2004-08-04 05:38:20 UTC
It looks like libgnome was built to do exactly what you suggest:

### gnome-score.c ###
   realname = g_strdup (g_get_real_name ());
   if (strlen (realname) == 0)
     realname = g_strdup (g_get_user_name ());
### ------------- ###

However, these days ( as noted in Bug #143552 ) , g_get_real_name 
returns "Unknown" when the real name can not be found. It looks like the 
snippet above stopped working with glib after Jan. 1999.... :)

As far as spoofing, any administrator concerned about that would simply remove 
chfn.
Comment 5 Callum McKenzie 2004-08-04 10:26:32 UTC
I've filed a patch against libgnome to fix this. With luck it will go in soon.
See bug #149270 and try it out.

As far as spoofing goes, the worst that can happen is that you get framed for
your coworkers game use.
Comment 6 Allison Karlitskaya (desrt) 2004-08-04 10:37:02 UTC
Ya... I was sort of kidding about that whole spoofing thing :)
Comment 7 Callum McKenzie 2004-08-27 03:56:04 UTC
*** Bug 151181 has been marked as a duplicate of this bug. ***
Comment 8 Richard Hoelscher 2005-01-25 12:50:29 UTC
Bug 149270 has been resolved (in CVS libgnome), so this one is too. 
Comment 9 Callum McKenzie 2005-06-09 00:29:52 UTC
*** Bug 306922 has been marked as a duplicate of this bug. ***