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:
Axel Dörfler 2014-10-25 15:53:57 +02:00
parent 87d1eac74e
commit 49c31016cd

View File

@ -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;