View | Details | Raw Unified
Collapse All | Expand All

(-) inode.c.orig (-2 / +2 lines)
 Lines 826-832    Link Here 
/* Basically copied from the kernel vfs permission(), but we've changed
/* Basically copied from the kernel vfs permission(), but we've changed
 * the following: (1) the IS_RDONLY check is skipped, and (2) if you define
 * the following: (1) the IS_RDONLY check is skipped, and (2) if you define
 * -DNFS_SECURITY_HOLE, we assume that -EACCESS means that the export is
 * -DNFS_SECURITY_HOLE, we assume that -EACCES means that the export is
 * read-only and we should check standard Unix permissions.  This means
 * read-only and we should check standard Unix permissions.  This means
 * that NFS ACL checks (or other advanced permission features) are bypassed.
 * that NFS ACL checks (or other advanced permission features) are bypassed.
 */
 */
 Lines 856-862    Link Here 
		retval = inode->i_op->permission(inode, submask, nd);
		retval = inode->i_op->permission(inode, submask, nd);
#ifdef NFS_SECURITY_HOLE
#ifdef NFS_SECURITY_HOLE
#define IS_NFS(inode) (strcmp("nfs", (inode)->i_sb->s_type->s_name))
#define IS_NFS(inode) (strcmp("nfs", (inode)->i_sb->s_type->s_name))
		if ((retval == -EACCESS) && (submask & MAY_WRITE) &&
		if ((retval == -EACCES) && (submask & MAY_WRITE) &&
		    IS_NFS(inode)) {
		    IS_NFS(inode)) {
			retval = generic_permission(inode, submask, NULL);
			retval = generic_permission(inode, submask, NULL);
		}
		}