libauth: fix mount file-descriptor leak in auth_chuid()
This commit is contained in:
parent
2a6fd6ec25
commit
b540a22eb0
1 changed files with 3 additions and 1 deletions
|
@ -30,8 +30,10 @@ auth_chuid(AuthInfo *ai, char *ns)
|
|||
|
||||
/* get a link to factotum as new user */
|
||||
fd = open("/srv/factotum", ORDWR);
|
||||
if(fd >= 0)
|
||||
if(fd >= 0){
|
||||
mount(fd, -1, "/mnt", MREPL, "");
|
||||
close(fd);
|
||||
}
|
||||
|
||||
/* set up new namespace */
|
||||
return newns(ai->cuid, ns);
|
||||
|
|
Loading…
Reference in a new issue