projects
/
silc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
60b49bb
)
get_real_name fix from nh <nhwith@bonbon.net>
author
Pekka Riikonen
<priikone@silcnet.org>
Tue, 25 Jul 2006 06:14:48 +0000
(06:14 +0000)
committer
Pekka Riikonen
<priikone@silcnet.org>
Tue, 25 Jul 2006 06:14:48 +0000
(06:14 +0000)
lib/silcutil/unix/silcunixutil.c
patch
|
blob
|
history
diff --git
a/lib/silcutil/unix/silcunixutil.c
b/lib/silcutil/unix/silcunixutil.c
index 300beff0b391571d13d637c87de9ec13d3c46a9b..92bfaded55911cd5944a027db0df3d26407badc0 100644
(file)
--- a/
lib/silcutil/unix/silcunixutil.c
+++ b/
lib/silcutil/unix/silcunixutil.c
@@
-160,11
+160,14
@@
char *silc_get_real_name()
pw = getpwuid(getuid());
if (!pw)
-
return strdup("Foo T. Bar");
+ return strdup("Foo T. Bar");
if (strchr(pw->pw_gecos, ','))
*strchr(pw->pw_gecos, ',') = 0;
+ if (!strlen(pw->pw_gecos))
+ return strdup("Foo T. Bar");
+
realname = strdup(pw->pw_gecos);
return realname;