]>
Commit | Line | Data |
---|---|---|
2bd0ea18 | 1 | /* |
da23017d NS |
2 | * Copyright (c) 2000-2002,2004-2005 Silicon Graphics, Inc. |
3 | * All Rights Reserved. | |
dfc130f3 | 4 | * |
da23017d NS |
5 | * This program is free software; you can redistribute it and/or |
6 | * modify it under the terms of the GNU General Public License as | |
2bd0ea18 | 7 | * published by the Free Software Foundation. |
dfc130f3 | 8 | * |
da23017d NS |
9 | * This program is distributed in the hope that it would be useful, |
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
12 | * GNU General Public License for more details. | |
dfc130f3 | 13 | * |
da23017d NS |
14 | * You should have received a copy of the GNU General Public License |
15 | * along with this program; if not, write the Free Software Foundation, | |
16 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | |
2bd0ea18 | 17 | */ |
2bd0ea18 NS |
18 | #ifndef _XR_ATTRREPAIR_H |
19 | #define _XR_ATTRREPAIR_H | |
20 | ||
33a4da69 NS |
21 | /* |
22 | * Access Control Lists | |
23 | */ | |
fc49813f NS |
24 | #define ACL_USER_OBJ 0x01 /* owner */ |
25 | #define ACL_USER 0x02 /* additional users */ | |
26 | #define ACL_GROUP_OBJ 0x04 /* group */ | |
27 | #define ACL_GROUP 0x08 /* additional groups */ | |
28 | #define ACL_MASK 0x10 /* mask entry */ | |
43533211 | 29 | #define ACL_OTHER 0x20 /* other entry */ |
fc49813f | 30 | |
0b656633 NS |
31 | #define ACL_READ 04 |
32 | #define ACL_WRITE 02 | |
33 | #define ACL_EXECUTE 01 | |
34 | ||
33a4da69 NS |
35 | typedef __uint16_t xfs_acl_perm_t; |
36 | typedef __int32_t xfs_acl_type_t; | |
37 | typedef __int32_t xfs_acl_tag_t; | |
38 | typedef __int32_t xfs_acl_id_t; | |
39 | ||
40 | typedef struct xfs_acl_entry { | |
41 | xfs_acl_tag_t ae_tag; | |
42 | xfs_acl_id_t ae_id; | |
43 | xfs_acl_perm_t ae_perm; | |
44 | } xfs_acl_entry_t; | |
45 | ||
46 | #define XFS_ACL_MAX_ENTRIES 25 | |
47 | typedef struct xfs_acl { | |
48 | __int32_t acl_cnt; | |
49 | xfs_acl_entry_t acl_entry[XFS_ACL_MAX_ENTRIES]; | |
50 | } xfs_acl_t; | |
51 | ||
52 | #define SGI_ACL_FILE "SGI_ACL_FILE" | |
53 | #define SGI_ACL_DEFAULT "SGI_ACL_DEFAULT" | |
54 | #define SGI_ACL_FILE_SIZE (sizeof(SGI_ACL_FILE)-1) | |
55 | #define SGI_ACL_DEFAULT_SIZE (sizeof(SGI_ACL_DEFAULT)-1) | |
56 | ||
57 | ||
58 | /* | |
59 | * Mandatory Access Control Labels (IRIX) | |
60 | */ | |
61 | #define XFS_MAC_MAX_SETS 250 | |
62 | typedef struct xfs_mac_label { | |
63 | __uint8_t ml_msen_type; /* MSEN label type */ | |
64 | __uint8_t ml_mint_type; /* MINT label type */ | |
65 | __uint8_t ml_level; /* Hierarchical level */ | |
66 | __uint8_t ml_grade; /* Hierarchical grade */ | |
67 | __uint16_t ml_catcount; /* Category count */ | |
68 | __uint16_t ml_divcount; /* Division count */ | |
69 | /* Category set, then Division set */ | |
70 | __uint16_t ml_list[XFS_MAC_MAX_SETS]; | |
71 | } xfs_mac_label_t; | |
72 | ||
73 | /* MSEN label type names. Choose an upper case ASCII character. */ | |
74 | #define XFS_MSEN_ADMIN_LABEL 'A' /* Admin: low<admin != tcsec<high */ | |
75 | #define XFS_MSEN_EQUAL_LABEL 'E' /* Wildcard - always equal */ | |
76 | #define XFS_MSEN_HIGH_LABEL 'H' /* System High - always dominates */ | |
77 | #define XFS_MSEN_MLD_HIGH_LABEL 'I' /* System High, multi-level dir */ | |
78 | #define XFS_MSEN_LOW_LABEL 'L' /* System Low - always dominated */ | |
79 | #define XFS_MSEN_MLD_LABEL 'M' /* TCSEC label on a multi-level dir */ | |
80 | #define XFS_MSEN_MLD_LOW_LABEL 'N' /* System Low, multi-level dir */ | |
81 | #define XFS_MSEN_TCSEC_LABEL 'T' /* TCSEC label */ | |
82 | #define XFS_MSEN_UNKNOWN_LABEL 'U' /* unknown label */ | |
83 | ||
84 | /* MINT label type names. Choose a lower case ASCII character. */ | |
85 | #define XFS_MINT_BIBA_LABEL 'b' /* Dual of a TCSEC label */ | |
86 | #define XFS_MINT_EQUAL_LABEL 'e' /* Wildcard - always equal */ | |
87 | #define XFS_MINT_HIGH_LABEL 'h' /* High Grade - always dominates */ | |
88 | #define XFS_MINT_LOW_LABEL 'l' /* Low Grade - always dominated */ | |
89 | ||
90 | #define SGI_MAC_FILE "SGI_MAC_FILE" | |
91 | #define SGI_MAC_FILE_SIZE (sizeof(SGI_MAC_FILE)-1) | |
92 | ||
93 | ||
94 | /* | |
95 | * Capabilities (IRIX) | |
96 | */ | |
97 | typedef __uint64_t xfs_cap_value_t; | |
98 | ||
99 | typedef struct xfs_cap_set { | |
100 | xfs_cap_value_t cap_effective; /* use in capability checks */ | |
101 | xfs_cap_value_t cap_permitted; /* combined with file attrs */ | |
102 | xfs_cap_value_t cap_inheritable;/* pass through exec */ | |
103 | } xfs_cap_set_t; | |
104 | ||
105 | #define SGI_CAP_FILE "SGI_CAP_FILE" | |
106 | #define SGI_CAP_FILE_SIZE (sizeof(SGI_CAP_FILE)-1) | |
107 | ||
108 | ||
109 | /* | |
110 | * External functions | |
111 | */ | |
8c4a2bb0 NS |
112 | struct blkmap; |
113 | extern int process_attributes (xfs_mount_t *, xfs_ino_t, xfs_dinode_t *, | |
114 | struct blkmap *, int *); | |
2bd0ea18 | 115 | |
2bd0ea18 | 116 | #endif /* _XR_ATTRREPAIR_H */ |