summaryrefslogtreecommitdiff
path: root/sys/src/cmd/cwfs/config.c
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2014-08-11 22:36:59 +0200
committercinap_lenrek <cinap_lenrek@felloff.net>2014-08-11 22:36:59 +0200
commit427e925eea1ea4ca9a5308b7b08af01785389991 (patch)
treeec23e79aea9861e9945ae05cfffc62b87e497655 /sys/src/cmd/cwfs/config.c
parent30d4d8984bfc64e971bfbb3b913c37ed8a8da17b (diff)
cwfs: add optional uid argument to allow command, unify permission override code
the allow command now takes an optional uid argument for the user to be granted temporary god status on the fileserver for maintenance. this was kenji okomotos idea, so thanks :) remove wstatallow and writeallow flags. instead, we have global: int allowed; that contains the uid of the currently allowed user id or -1 if permission checking is globally disabled for the fileserver. when zero, normal permission checking takes place. added int isallowed(File*) function that returns non-zero when the context is the console, or the allowed user. this is also used internally by iaccess(), so all the extra code of in the callers of iaccess() is gone now. dont conflate allowed user with noauth flag and auto-allow on ream. the installer already knows about noauth and allow flags so theres no problem with bootstraping.
Diffstat (limited to 'sys/src/cmd/cwfs/config.c')
-rw-r--r--sys/src/cmd/cwfs/config.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/sys/src/cmd/cwfs/config.c b/sys/src/cmd/cwfs/config.c
index da71fcd69..a59306e90 100644
--- a/sys/src/cmd/cwfs/config.c
+++ b/sys/src/cmd/cwfs/config.c
@@ -1105,9 +1105,6 @@ arginit(void)
}
switch(verb) {
case FREAM:
- if(strcmp(fs->name, "main") == 0)
- wstatallow = 1; /* only set, never reset */
- /* fallthrough */
case FRECOVER:
fs->flags |= verb;
break;