delay user prompt until after -u is parsed (Randall Bohn)

This commit is contained in:
Russ Cox 2008-12-06 23:31:02 +00:00
parent b012e1ab6a
commit 189f67ae9b
1 changed files with 4 additions and 3 deletions

7
cpu.c
View File

@ -111,9 +111,7 @@ cpumain(int argc, char **argv)
close(fd);
}
user = getenv("USER");
if(user == nil)
user = readcons("user", nil, 0);
user = getenv("USER");
secstoreserver = nil;
authserver = getenv("auth");
if(authserver == nil)
@ -161,6 +159,9 @@ cpumain(int argc, char **argv)
if(argc != 0)
usage();
if(user == nil)
user = readcons("user", nil, 0);
if(mountfactotum() < 0){
if(secstoreserver == nil)
secstoreserver = authserver;