diff options
author | cinap_lenrek <cinap_lenrek@felloff.net> | 2016-08-04 11:47:12 +0200 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2016-08-04 11:47:12 +0200 |
commit | 2a6fd6ec25c66e87dd0127651549a2f8585c751f (patch) | |
tree | 9dc07138ff2c87f4232fbbc24254224f8340aadf /sys/src | |
parent | ad6bb37e33d647411e1ee6cbd067433710f98267 (diff) |
auth/login: add dp9ik key to sub factotum, get rid of temporary /srv file
Diffstat (limited to 'sys/src')
-rw-r--r-- | sys/src/cmd/auth/login.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/sys/src/cmd/auth/login.c b/sys/src/cmd/auth/login.c index 3857c8ff4..94476f377 100644 --- a/sys/src/cmd/auth/login.c +++ b/sys/src/cmd/auth/login.c @@ -80,7 +80,6 @@ getauthdom(void) break; } ndbfree(t); -fprint(2, "authdom=%s\n", authdom); return authdom; } @@ -103,10 +102,7 @@ startfactotum(char *user, char *password, char *srvname) sysfatal("starting factotum: %r"); break; } - - /* wait for agent to really be there */ - while(access(srvname, 0) < 0) - sleep(250); + waitpid(); /* mount it */ mountfactotum(srvname); @@ -115,7 +111,8 @@ startfactotum(char *user, char *password, char *srvname) fd = open("/mnt/factotum/ctl", ORDWR); if(fd < 0) sysfatal("opening factotum: %r"); - fprint(fd, "key proto=p9sk1 dom=%s user=%q !password=%q", getauthdom(), user, password); + fprint(fd, "key proto=dp9ik dom=%s user=%q !password=%q\n", getauthdom(), user, password); + fprint(fd, "key proto=p9sk1 dom=%s user=%q !password=%q\n", getauthdom(), user, password); close(fd); } @@ -182,6 +179,9 @@ main(int argc, char *argv[]) /* remount the factotum */ mountfactotum(srvname); + /* get rid of srvname */ + remove(srvname); + /* set up a new environment */ cputype = getenv("cputype"); sysname = getenv("sysname"); @@ -205,5 +205,5 @@ main(int argc, char *argv[]) /* read profile and start interactive rc */ execl("/bin/rc", "rc", "-li", nil); - exits(0); + exits(nil); } |