From 189f67ae9bd7f3ed5c1a6b7b0460646c3f746c54 Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Sat, 6 Dec 2008 23:31:02 +0000 Subject: [PATCH] delay user prompt until after -u is parsed (Randall Bohn) --- cpu.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/cpu.c b/cpu.c index ad5bdfe..3031962 100644 --- a/cpu.c +++ b/cpu.c @@ -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;