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
|
void
|
||||||
setuser(void)
|
setuser(void)
|
||||||
{
|
{
|
||||||
int fd;
|
if(procsetuser("none") < 0)
|
||||||
|
|
||||||
fd = open("#c/user", OWRITE);
|
|
||||||
if(fd < 0 || write(fd, "none", strlen("none")) < 0)
|
|
||||||
sysfatal("can't become none: %r");
|
sysfatal("can't become none: %r");
|
||||||
close(fd);
|
|
||||||
if(newns("none", nil) < 0)
|
if(newns("none", nil) < 0)
|
||||||
sysfatal("can't build namespace: %r");
|
sysfatal("can't build namespace: %r");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue