You don't exists [CID-60]

This commit is contained in:
Love Hornquist Astrand
2009-07-30 13:03:27 +02:00
parent fab281f465
commit e977f1cf2f

View File

@@ -169,6 +169,8 @@ main(int argc, char **argv)
path = getenv("SHELL"); path = getenv("SHELL");
if(path == NULL){ if(path == NULL){
struct passwd *pw = k_getpwuid(geteuid()); struct passwd *pw = k_getpwuid(geteuid());
if (pw == NULL)
errx(1, "no such user: %d", (int)geteuid());
path = strdup(pw->pw_shell); path = strdup(pw->pw_shell);
} }
} else { } else {