summaryrefslogtreecommitdiff
path: root/sys/src/cmd/auth
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2020-12-19 18:02:37 +0100
committercinap_lenrek <cinap_lenrek@felloff.net>2020-12-19 18:02:37 +0100
commiteb1dfed9abb054e4708fcb13ac6d8d537914ac77 (patch)
tree268c17a0a6758485989c4ffe71a092563936259a /sys/src/cmd/auth
parentfc5070c60057b6e02490e83f5d675786e8b8d83c (diff)
libauth: change programs to use the new procsetuser() function
Diffstat (limited to 'sys/src/cmd/auth')
-rw-r--r--sys/src/cmd/auth/none.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/sys/src/cmd/auth/none.c b/sys/src/cmd/auth/none.c
index 75d8b70fa..42c264b42 100644
--- a/sys/src/cmd/auth/none.c
+++ b/sys/src/cmd/auth/none.c
@@ -43,13 +43,8 @@ main(int argc, char *argv[])
usage();
}ARGEND
- fd = open("#c/user", OWRITE);
- if(fd < 0)
- sysfatal("can't open #c/user: %r");
- if(write(fd, "none", strlen("none")) < 0)
+ if(procsetuser("none") < 0)
sysfatal("can't become none: %r");
- close(fd);
-
if(newns("none", namespace) < 0)
sysfatal("can't build namespace: %r");