diff options
author | cinap_lenrek <cinap_lenrek@felloff.net> | 2021-02-23 01:41:09 +0100 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2021-02-23 01:41:09 +0100 |
commit | a96cf495fa9a315c86c723bd0a0bcd8bffaef42a (patch) | |
tree | 50089ec25a6cded83266a7736cf3943d4dd1aeec | |
parent | 5347bb9c96c79296e6b520014d2ed2a5ee0a718d (diff) | |
download | plan9front-a96cf495fa9a315c86c723bd0a0bcd8bffaef42a.tar.xz |
ip/tftpd: use procsetuser() instead of writing #c/user
-rw-r--r-- | sys/src/cmd/ip/tftpd.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/sys/src/cmd/ip/tftpd.c b/sys/src/cmd/ip/tftpd.c index ab6d91f70..aa69b3423 100644 --- a/sys/src/cmd/ip/tftpd.c +++ b/sys/src/cmd/ip/tftpd.c @@ -738,12 +738,8 @@ nak(int fd, int code, char *msg) void setuser(void) { - int fd; - - fd = open("#c/user", OWRITE); - if(fd < 0 || write(fd, "none", strlen("none")) < 0) + if(procsetuser("none") < 0) sysfatal("can't become none: %r"); - close(fd); if(newns("none", nil) < 0) sysfatal("can't build namespace: %r"); } |