diff options
Diffstat (limited to 'fs/namei.c')
| -rw-r--r-- | fs/namei.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/namei.c b/fs/namei.c index 68921d9b5302..b55440baf7ab 100644 --- a/fs/namei.c +++ b/fs/namei.c | |||
| @@ -232,6 +232,7 @@ int generic_permission(struct inode *inode, int mask, | |||
| 232 | /* | 232 | /* |
| 233 | * Searching includes executable on directories, else just read. | 233 | * Searching includes executable on directories, else just read. |
| 234 | */ | 234 | */ |
| 235 | mask &= MAY_READ | MAY_WRITE | MAY_EXEC; | ||
| 235 | if (mask == MAY_READ || (S_ISDIR(inode->i_mode) && !(mask & MAY_WRITE))) | 236 | if (mask == MAY_READ || (S_ISDIR(inode->i_mode) && !(mask & MAY_WRITE))) |
| 236 | if (capable(CAP_DAC_READ_SEARCH)) | 237 | if (capable(CAP_DAC_READ_SEARCH)) |
| 237 | return 0; | 238 | return 0; |
