patch-2.1.100 linux/fs/ext2/acl.c
Next file: linux/fs/ext2/balloc.c
Previous file: linux/fs/exec.c
Back to the patch index
Back to the overall index
- Lines: 15
- Date:
Wed May 6 10:56:08 1998
- Orig file:
v2.1.99/linux/fs/ext2/acl.c
- Orig date:
Sun Dec 21 17:41:24 1997
diff -u --recursive --new-file v2.1.99/linux/fs/ext2/acl.c linux/fs/ext2/acl.c
@@ -51,8 +51,11 @@
* Access is always granted for root. We now check last,
* though, for BSD process accounting correctness
*/
- if (((mode & mask & S_IRWXO) == mask) || fsuser())
+ if (((mode & mask & S_IRWXO) == mask) || capable(CAP_DAC_OVERRIDE))
return 0;
- else
- return -EACCES;
+ if ((mask == S_IROTH) ||
+ (S_ISDIR(mode) && !(mask & ~(S_IROTH | S_IXOTH))))
+ if (capable(CAP_DAC_READ_SEARCH))
+ return 0;
+ return -EACCES;
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov