patch-2.2.19 linux/fs/nfsd/auth.c

Next file: linux/fs/nfsd/export.c
Previous file: linux/fs/nfs/write.c
Back to the patch index
Back to the overall index

diff -u --new-file --recursive --exclude-from /usr/src/exclude v2.2.18/fs/nfsd/auth.c linux/fs/nfsd/auth.c
@@ -10,6 +10,7 @@
 #include <linux/sunrpc/svcauth.h>
 #include <linux/nfsd/nfsd.h>
 
+#define	CAP_NFSD_MASK (CAP_FS_MASK|CAP_TO_MASK(CAP_SYS_RESOURCE))
 void
 nfsd_setuser(struct svc_rqst *rqstp, struct svc_export *exp)
 {
@@ -50,10 +51,10 @@
 	current->ngroups = i;
 
 	if ((cred->cr_uid)) {
-		cap_t(current->cap_effective) &= ~CAP_FS_MASK;
+		cap_t(current->cap_effective) &= ~CAP_NFSD_MASK;
 	} else {
-		cap_t(current->cap_effective) |= (CAP_FS_MASK &
-		                                  current->cap_permitted);
+		cap_t(current->cap_effective) |= (CAP_NFSD_MASK &
+						  current->cap_permitted);
 	}
 
 	rqstp->rq_userset = 1;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)