From 210be38e4df598dd75994e3c71766f39688f4c6a Mon Sep 17 00:00:00 2001 From: Charles Forsyth Date: Tue, 29 Mar 2016 16:13:36 +0100 Subject: [PATCH] use conventional user 'nobody' if user 'none' is not defined --- u9fs.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/u9fs.c b/u9fs.c index 7d66d1e..1856e1b 100644 --- a/u9fs.c +++ b/u9fs.c @@ -424,6 +424,8 @@ rattach(Fcall *rx, Fcall *tx) seterror(tx, Eauth); return; } + if(none != nil) + rx->uname = none->name; } else { if((e = auth->attach(rx, tx)) != nil){ seterror(tx, e); @@ -1825,6 +1827,8 @@ main(int argc, char **argv) root = argv[0]; none = uname2user("none"); + if(none == nil) + none = uname2user("nobody"); serve(0, 1); return 0;