projects
/
crypto.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8dc0b1d
)
get_real_name fix from nh <nhwith@bonbon.net>
author
Pekka Riikonen
<priikone@silcnet.org>
Tue, 25 Jul 2006 06:14:05 +0000
(06:14 +0000)
committer
Pekka Riikonen
<priikone@silcnet.org>
Tue, 25 Jul 2006 06:14:05 +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 15356c52b92b474f40b0f5e01c27a709920ad948..c20ebdb876f8175542fbaf07692f1c1df90a93d5 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("No Name
");
if (strchr(pw->pw_gecos, ','))
*strchr(pw->pw_gecos, ',') = 0;
+ if (!strlen(pw->pw_gecos))
+ return strdup("No Name");
+
realname = strdup(pw->pw_gecos);
return realname;