[monkey-bubble: 720/753] Handle blank real name fields in the passwd file correctly. Patch from
- From: Sven Herzberg <herzi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [monkey-bubble: 720/753] Handle blank real name fields in the passwd file correctly. Patch from
- Date: Wed, 14 Jul 2010 22:56:13 +0000 (UTC)
commit 82ab8f163d7a106c3bd40b4fc472904bce56b9e6
Author: Kjartan Maraas <kmaraas gnome org>
Date: Tue Jan 25 12:19:09 2005 +0000
Handle blank real name fields in the passwd file correctly. Patch from
2005-01-25 Kjartan Maraas <kmaraas gnome org>
* libgnome/gnome-score.c: (gnome_score_child): Handle
blank real name fields in the passwd file correctly.
Patch from Callum McKenzie <callum at physics otago ac nz>
Closes bug #149270.
libgnome/gnome-score.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/libgnome/gnome-score.c b/libgnome/gnome-score.c
index cb8bbde..830c5ea 100644
--- a/libgnome/gnome-score.c
+++ b/libgnome/gnome-score.c
@@ -238,8 +238,10 @@ gnome_score_child (void)
setfsgid (gid);
#endif
realname = g_strdup (g_get_real_name ());
- if (strlen (realname) == 0)
+ if (strcmp (realname, "Unknown") == 0) {
+ g_free (realname);
realname = g_strdup (g_get_user_name ());
+ }
while (read (STDIN_FILENO, &cmd, sizeof cmd) == sizeof(cmd)) {
level = g_new (char, cmd.level);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]