Blame view
fs/xfs/xfs_acl.h
2.15 KB
1da177e4c
|
1 |
/* |
7b7187698
|
2 3 |
* Copyright (c) 2001-2005 Silicon Graphics, Inc. * All Rights Reserved. |
1da177e4c
|
4 |
* |
7b7187698
|
5 6 |
* This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as |
1da177e4c
|
7 8 |
* published by the Free Software Foundation. * |
7b7187698
|
9 10 11 12 |
* This program is distributed in the hope that it would be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. |
1da177e4c
|
13 |
* |
7b7187698
|
14 15 16 |
* You should have received a copy of the GNU General Public License * along with this program; if not, write the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
1da177e4c
|
17 18 19 |
*/ #ifndef __XFS_ACL_H__ #define __XFS_ACL_H__ |
ef14f0c15
|
20 21 22 |
struct inode; struct posix_acl; struct xfs_inode; |
1da177e4c
|
23 |
|
1aacc064e
|
24 |
#define XFS_ACL_MAX_ENTRIES 25 |
1da177e4c
|
25 |
#define XFS_ACL_NOT_PRESENT (-1) |
ef14f0c15
|
26 27 28 29 30 31 32 33 34 |
/* On-disk XFS access control list structure */ struct xfs_acl { __be32 acl_cnt; struct xfs_acl_entry { __be32 ae_tag; __be32 ae_id; __be16 ae_perm; } acl_entry[XFS_ACL_MAX_ENTRIES]; }; |
1da177e4c
|
35 36 |
/* On-disk XFS extended attribute names */ |
a9273ca5c
|
37 38 |
#define SGI_ACL_FILE (unsigned char *)"SGI_ACL_FILE" #define SGI_ACL_DEFAULT (unsigned char *)"SGI_ACL_DEFAULT" |
1da177e4c
|
39 40 |
#define SGI_ACL_FILE_SIZE (sizeof(SGI_ACL_FILE)-1) #define SGI_ACL_DEFAULT_SIZE (sizeof(SGI_ACL_DEFAULT)-1) |
1da177e4c
|
41 |
#ifdef CONFIG_XFS_POSIX_ACL |
b74c79e99
|
42 |
extern int xfs_check_acl(struct inode *inode, int mask, unsigned int flags); |
ef14f0c15
|
43 44 45 |
extern struct posix_acl *xfs_get_acl(struct inode *inode, int type); extern int xfs_inherit_acl(struct inode *inode, struct posix_acl *default_acl); extern int xfs_acl_chmod(struct inode *inode); |
ef14f0c15
|
46 47 |
extern int posix_acl_access_exists(struct inode *inode); extern int posix_acl_default_exists(struct inode *inode); |
1da177e4c
|
48 |
|
46e58764f
|
49 50 |
extern const struct xattr_handler xfs_xattr_acl_access_handler; extern const struct xattr_handler xfs_xattr_acl_default_handler; |
1da177e4c
|
51 |
#else |
ef14f0c15
|
52 53 54 55 |
# define xfs_check_acl NULL # define xfs_get_acl(inode, type) NULL # define xfs_inherit_acl(inode, default_acl) 0 # define xfs_acl_chmod(inode) 0 |
ef14f0c15
|
56 57 58 |
# define posix_acl_access_exists(inode) 0 # define posix_acl_default_exists(inode) 0 #endif /* CONFIG_XFS_POSIX_ACL */ |
1da177e4c
|
59 |
#endif /* __XFS_ACL_H__ */ |