summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/src/libauth/auth_chuid.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/src/libauth/auth_chuid.c b/sys/src/libauth/auth_chuid.c
index 7ba0cfc6d..300e93f67 100644
--- a/sys/src/libauth/auth_chuid.c
+++ b/sys/src/libauth/auth_chuid.c
@@ -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);