Browse Source

fixed username function (wtf happened here?)

master
Aaron Marcher 9 years ago
committed by Aaron Marcher (drkhsh)
parent
commit
545f1560e6
  1. 9
      slstatus.c

9
slstatus.c

@ -455,11 +455,12 @@ username(void)
uid_t uid = geteuid(); uid_t uid = geteuid();
struct passwd *pw = getpwuid(uid); struct passwd *pw = getpwuid(uid);
if (pw == NULL) if (pw == NULL) {
return smprintf("%s", pw->pw_name); warn("Could not get username");
return smprintf(UNKNOWN_STR);
}
warn("Could not get username"); return smprintf("%s", pw->pw_name);
return smprintf(UNKNOWN_STR);
} }
static char * static char *

Loading…
Cancel
Save