瀏覽代碼

Removed hack in bootauth.c

User can be specified in boot parameters as user=????

Change-Id: I82034de19f2001fca70592b72996a0e18e62c5ae
Signed-off-by: Keith Poole <keith.poole@gmail.com>
Keith Poole 8 年之前
父節點
當前提交
94abec8258
共有 2 個文件被更改,包括 2 次插入4 次删除
  1. 1 3
      sys/src/9/boot/bootauth.c
  2. 1 1
      util/GO9PRUN

+ 1 - 3
sys/src/9/boot/bootauth.c

@@ -22,13 +22,11 @@ authentication(int cpuflag)
 	char *argv[16], **av;
 	int ac;
 
-	if(access("/boot/factotum", AEXEC) < 0){
+	if(access("/boot/factotum", AEXEC) < 0|| getenv("user") != nil){
 		glenda();
 		return;
 	}
 
-	print("HACK always run glenda even if we have factotum.. \n");
-	glenda();
 	/* start agent */
 	ac = 0;
 	av = argv;

+ 1 - 1
util/GO9PRUN

@@ -18,7 +18,7 @@ $kvmdo qemu-system-x86_64 -s -cpu Opteron_G1 -smp 1 -m 2048 $kvmflag \
 -net dump,file=/tmp/vm0.pcap \
 -redir tcp:17010::17010 \
 -redir tcp:17013::17013 \
--append "nobootprompt=tcp maxcores=1024 fs=10.0.2.2 auth=10.0.2.2 param" \
+-append "nobootprompt=tcp maxcores=1024 fs=10.0.2.2 auth=10.0.2.2 user=glenda" \
 -kernel 9k8cpu.32bit $*
 EOF