summaryrefslogtreecommitdiff
path: root/sys/src/cmd/cwfs/9p2.c
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@localhost>2011-04-17 09:29:38 +0000
committercinap_lenrek <cinap_lenrek@localhost>2011-04-17 09:29:38 +0000
commit95758309f394f79ac52a774cd02eb7136346d145 (patch)
tree6bc627632e961f74c18b46bcf9991a859e55a442 /sys/src/cmd/cwfs/9p2.c
parentedca9072a5e9c278371960b30bf818f99f0d1430 (diff)
cwfs: make noauth a storable config option so one can boot without factotum and nvram
Diffstat (limited to 'sys/src/cmd/cwfs/9p2.c')
-rw-r--r--sys/src/cmd/cwfs/9p2.c16
1 files changed, 3 insertions, 13 deletions
diff --git a/sys/src/cmd/cwfs/9p2.c b/sys/src/cmd/cwfs/9p2.c
index ec89a5263..584b1904f 100644
--- a/sys/src/cmd/cwfs/9p2.c
+++ b/sys/src/cmd/cwfs/9p2.c
@@ -165,7 +165,7 @@ auth(Chan* chan, Fcall* f, Fcall* r)
Filsys *fs;
int error;
- if(cons.flags & authdisableflag)
+ if(noauth || wstatallow)
return Eauthdisabled;
error = 0;
@@ -202,9 +202,6 @@ auth(Chan* chan, Fcall* f, Fcall* r)
}
r->aqid = file->qid;
out:
- if((cons.flags & attachflag) && error)
- print("9p2: auth %s %T SUCK EGGS --- %s\n",
- f->uname, time(nil), errstr9p[error]);
if(file != nil){
qunlock(file);
if(error)
@@ -229,10 +226,10 @@ authorize(Chan* chan, Fcall* f)
return uid;
}
- if(cons.flags & authdisableflag){
+ if(noauth || wstatallow){
uid = strtouid(f->uname);
if(db)
- print("permission granted by authdisable uid %s = %d\n",
+ print("permission granted by noauth uid %s = %d\n",
f->uname, uid);
return uid;
}
@@ -326,14 +323,7 @@ attach(Chan* chan, Fcall* f, Fcall* r)
strncpy(chan->whoname, f->uname, sizeof(chan->whoname));
chan->whotime = time(nil);
- if(cons.flags & attachflag)
- print("9p2: attach %s %T to \"%s\" C%d\n",
- chan->whoname, chan->whotime, fs->name, chan->chan);
-
out:
- if((cons.flags & attachflag) && error)
- print("9p2: attach %s %T SUCK EGGS --- %s\n",
- f->uname, time(nil), errstr9p[error]);
if(p != nil)
putbuf(p);
if(file != nil){