From: Pekka Riikonen Date: Tue, 25 Jul 2006 06:14:05 +0000 (+0000) Subject: get_real_name fix from nh X-Git-Tag: 1.2.beta1~718 X-Git-Url: http://git.silcnet.org/gitweb/?a=commitdiff_plain;h=e4c09fcb1d13eac6a7f61d5101bed710f6928294;p=runtime.git get_real_name fix from nh --- diff --git a/lib/silcutil/unix/silcunixutil.c b/lib/silcutil/unix/silcunixutil.c index 15356c52..c20ebdb8 100644 --- 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;