vfs/{b|btr|package|b}fs/ext2/exfat: common access check.

* Added VFS helper function check_access_permissions() that combines
  several partially correct versions to the one true version (tm).
* All but BFS (since recently) missed the S_IXOTH for root on directories,
  and all but packagefs missed proper group handling.
This commit is contained in:
Axel Dörfler
2014-10-25 18:47:15 +02:00
parent 2ce0d69a7e
commit 5a95af70a2
8 changed files with 84 additions and 219 deletions
+4 -1
View File
@@ -1,10 +1,11 @@
/*
* Copyright 2004-2010, Haiku Inc. All Rights Reserved.
* Copyright 2004-2014, Haiku Inc. All Rights Reserved.
* Distributed under the terms of the MIT License.
*/
#ifndef _FS_INTERFACE_H
#define _FS_INTERFACE_H
/*! File System Interface Layer Definition */
@@ -330,6 +331,8 @@ extern status_t unremove_vnode(fs_volume* volume, ino_t vnodeID);
extern status_t get_vnode_removed(fs_volume* volume, ino_t vnodeID,
bool* _removed);
extern fs_volume* volume_for_vnode(fs_vnode* vnode);
extern status_t check_access_permissions(int accessMode, mode_t mode,
gid_t nodeGroupID, uid_t nodeUserID);
extern status_t read_pages(int fd, off_t pos, const struct iovec* vecs,
size_t count, size_t* _numBytes);