namei.c (7f2da1e7d0330395e5e9e350b879b98a1ea495df) | namei.c (a110343f0d6d41f68b7cf8c00b57a3172c67f816) |
---|---|
1/* 2 * linux/fs/namei.c 3 * 4 * Copyright (C) 1991, 1992 Linus Torvalds 5 */ 6 7/* 8 * Some corrections by tytso. --- 251 unchanged lines hidden (view full) --- 260 if (mnt && (mnt->mnt_flags & MNT_NOEXEC)) 261 return -EACCES; 262 } 263 264 /* Ordinary permission routines do not understand MAY_APPEND. */ 265 if (inode->i_op && inode->i_op->permission) { 266 int extra = 0; 267 if (nd) { | 1/* 2 * linux/fs/namei.c 3 * 4 * Copyright (C) 1991, 1992 Linus Torvalds 5 */ 6 7/* 8 * Some corrections by tytso. --- 251 unchanged lines hidden (view full) --- 260 if (mnt && (mnt->mnt_flags & MNT_NOEXEC)) 261 return -EACCES; 262 } 263 264 /* Ordinary permission routines do not understand MAY_APPEND. */ 265 if (inode->i_op && inode->i_op->permission) { 266 int extra = 0; 267 if (nd) { |
268 if (nd->flags & LOOKUP_ACCESS) 269 extra |= MAY_ACCESS; | |
270 if (nd->flags & LOOKUP_OPEN) 271 extra |= MAY_OPEN; 272 } 273 retval = inode->i_op->permission(inode, mask | extra); 274 if (!retval) { 275 /* 276 * Exec permission on a regular file is denied if none 277 * of the execute bits are set. --- 2656 unchanged lines hidden --- | 268 if (nd->flags & LOOKUP_OPEN) 269 extra |= MAY_OPEN; 270 } 271 retval = inode->i_op->permission(inode, mask | extra); 272 if (!retval) { 273 /* 274 * Exec permission on a regular file is denied if none 275 * of the execute bits are set. --- 2656 unchanged lines hidden --- |