ref: 189f67ae9bd7f3ed5c1a6b7b0460646c3f746c54
parent: b012e1ab6a9a2c6a1478d8b9cf0672c865104b5a
author: Russ Cox <rsc@swtch.com>
date: Sat Dec 6 18:31:02 EST 2008
delay user prompt until after -u is parsed (Randall Bohn)
--- a/cpu.c
+++ b/cpu.c
@@ -111,9 +111,7 @@
close(fd);
}
- user = getenv("USER");
- if(user == nil)
- user = readcons("user", nil, 0);
+ user = getenv("USER");
secstoreserver = nil;
authserver = getenv("auth");
if(authserver == nil)
@@ -160,6 +158,9 @@
if(argc != 0)
usage();
+
+ if(user == nil)
+ user = readcons("user", nil, 0);
if(mountfactotum() < 0){
if(secstoreserver == nil)