6 * become the authenticated user
9 auth_chuid(AuthInfo *ai, char *ns)
13 if(ai == nil || ai->cap == nil || ai->cap[0] == 0){
14 werrstr("no capability");
19 fd = open("#¤/capuse", OWRITE);
21 werrstr("opening #¤/capuse: %r");
24 rv = write(fd, ai->cap, strlen(ai->cap));
27 werrstr("writing %s to #¤/capuse: %r", ai->cap);
31 /* get a link to factotum as new user */
32 fd = open("/srv/factotum", ORDWR);
34 mount(fd, -1, "/mnt", MREPL, "");
36 /* set up new namespace */
37 return newns(ai->cuid, ns);