patch-2.2.0-pre2 linux/fs/nfsd/auth.c

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

diff -u --recursive --new-file v2.2.0-pre1/linux/fs/nfsd/auth.c linux/fs/nfsd/auth.c
@@ -50,11 +50,10 @@
 	current->ngroups = i;
 
 	if ((cred->cr_uid)) {
-		cap_lower(current->cap_effective, CAP_DAC_OVERRIDE);
-		cap_lower(current->cap_effective, CAP_DAC_READ_SEARCH);
+		cap_t(current->cap_effective) &= ~CAP_FS_MASK;
 	} else {
-		cap_raise(current->cap_effective, CAP_DAC_OVERRIDE);
-		cap_raise(current->cap_effective, CAP_DAC_READ_SEARCH);
+		cap_t(current->cap_effective) |= (CAP_FS_MASK &
+		                                  current->cap_permitted);
 	}
 
 	rqstp->rq_userset = 1;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov