summaryrefslogtreecommitdiff
path: root/sys/src/cmd/cwfs/all.h
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/all.h
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/all.h')
-rw-r--r--sys/src/cmd/cwfs/all.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/sys/src/cmd/cwfs/all.h b/sys/src/cmd/cwfs/all.h
index 1cf878b04..4c358ba78 100644
--- a/sys/src/cmd/cwfs/all.h
+++ b/sys/src/cmd/cwfs/all.h
@@ -85,12 +85,10 @@ int noauth; /* auth is disable */
int nonone; /* attach as none disabled */
int noatime; /* atime is disabled */
int noatimeset; /* noatime was changed (reset after dump) */
-int wstatallow; /* set to circumvent wstat permissions */
-int writeallow; /* set to circumvent write permissions */
+int allowed; /* allow wstat and disable permission checks
+ * for user or anyone when -1 */
int duallow; /* single user to allow du */
int readonly; /* disable writes if true */
-
-
int rawreadok; /* allow reading raw data */
File* flist[5003]; /* base of file structures */