ip/tftpd: use procsetuser() instead of writing #c/user
This commit is contained in:
parent
5347bb9c96
commit
a96cf495fa
1 changed files with 1 additions and 5 deletions
|
@ -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");
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue