bfs: root may always enter directories.
* If you're root, you can now always enter directories, even if they don't have the X permission.
This commit is contained in:
parent
87d1eac74e
commit
49c31016cd
@ -523,6 +523,8 @@ Inode::CheckPermissions(int accessMode) const
|
||||
// X bits must be set for execute permission
|
||||
permissions = userPermissions | groupPermissions | otherPermissions
|
||||
| R_OK | W_OK;
|
||||
if (IsDirectory())
|
||||
permissions |= X_OK;
|
||||
} else if (uid == (uid_t)fNode.UserID()) {
|
||||
// user is node owner
|
||||
permissions = userPermissions;
|
||||
|
Loading…
Reference in New Issue
Block a user