* Always return a valid username. Affected file
lib/silcutil/unix/silcunixutil.c
+Sun Oct 1 20:39:34 CEST 2006 Jochen Eisinger <coffee@silcnet.org>
+
+ * Always return a valid username. Affected file
+ lib/silcutil/unix/silcunixutil.c
+
Sun Jul 2 19:12:36 CEST 2006 Jochen Eisinger <coffee@silcnet.org>
* Make gmake the default for autodist, so I can properly work
char *logname = NULL;
logname = getenv("LOGNAME");
- if (!logname) {
+ if (!logname || !strlen(logname)) {
logname = getlogin();
- if (!logname) {
+ if (!logname || !strlen(logname)) {
struct passwd *pw;
pw = getpwuid(getuid());
- if (!pw)
+ if (!pw || !strlen(pw->pw_name))
return strdup("foo");
logname = pw->pw_name;