X-Git-Url: http://git.silcnet.org/gitweb/?a=blobdiff_plain;f=lib%2Fsilcutil%2Funix%2Fsilcunixutil.c;h=42b6edace41826d5857a2355067cc547d682899e;hb=9734af565c9da0fdf77fd93283d7adcd8eb34b80;hp=8cb6a723f10db57e57b256888d35e5f8aa600ef1;hpb=6f6c6b1f52138ed5138c530614b24a503e542024;p=silc.git diff --git a/lib/silcutil/unix/silcunixutil.c b/lib/silcutil/unix/silcunixutil.c index 8cb6a723..42b6edac 100644 --- a/lib/silcutil/unix/silcunixutil.c +++ b/lib/silcutil/unix/silcunixutil.c @@ -140,11 +140,9 @@ char *silc_get_username() struct passwd *pw; pw = getpwuid(getuid()); - if (!pw) { - fprintf(stderr, "silc_get_username: %s\n", strerror(errno)); - return NULL; - } - + if (!pw) + return strdup("foo"); + logname = pw->pw_name; } } @@ -160,10 +158,8 @@ char *silc_get_real_name() struct passwd *pw; pw = getpwuid(getuid()); - if (!pw) { - fprintf(stderr, "silc_get_username: %s\n", strerror(errno)); - return NULL; - } + if (!pw) + return strdup("Foo T. Bar"); if (strchr(pw->pw_gecos, ',')) *strchr(pw->pw_gecos, ',') = 0;