s3-security: remove some more shared secdesc defines.
[Samba/ekacnet.git] / source3 / include / rpc_secdes.h
blob0badd0a4788244c66c9aeffb13d14f8a44a5b4ad
1 /*
2 Unix SMB/CIFS implementation.
3 SMB parameters and setup
4 Copyright (C) Andrew Tridgell 1992-2000
5 Copyright (C) Luke Kenneth Casson Leighton 1996-2000
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 3 of the License, or
10 (at your option) any later version.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program. If not, see <http://www.gnu.org/licenses/>.
21 #ifndef _RPC_SECDES_H /* _RPC_SECDES_H */
22 #define _RPC_SECDES_H
24 /* for ADS */
25 #define SEC_RIGHTS_FULL_CTRL 0xf01ff
27 /* security information */
28 #define OWNER_SECURITY_INFORMATION 0x00000001
29 #define GROUP_SECURITY_INFORMATION 0x00000002
30 #define DACL_SECURITY_INFORMATION 0x00000004
31 #define SACL_SECURITY_INFORMATION 0x00000008
32 /* Extra W2K flags. */
33 #define UNPROTECTED_SACL_SECURITY_INFORMATION 0x10000000
34 #define UNPROTECTED_DACL_SECURITY_INFORMATION 0x20000000
35 #define PROTECTED_SACL_SECURITY_INFORMATION 0x40000000
36 #define PROTECTED_DACL_SECURITY_INFORMATION 0x80000000
38 #define ALL_SECURITY_INFORMATION (OWNER_SECURITY_INFORMATION|GROUP_SECURITY_INFORMATION|\
39 DACL_SECURITY_INFORMATION|SACL_SECURITY_INFORMATION|\
40 UNPROTECTED_SACL_SECURITY_INFORMATION|\
41 UNPROTECTED_DACL_SECURITY_INFORMATION|\
42 PROTECTED_SACL_SECURITY_INFORMATION|\
43 PROTECTED_DACL_SECURITY_INFORMATION)
45 /* A type to describe the mapping of generic access rights to object
46 specific access rights. */
48 struct generic_mapping {
49 uint32 generic_read;
50 uint32 generic_write;
51 uint32 generic_execute;
52 uint32 generic_all;
55 struct standard_mapping {
56 uint32 std_read;
57 uint32 std_write;
58 uint32 std_execute;
59 uint32 std_all;
63 /* Security Access Masks Rights */
65 #define SPECIFIC_RIGHTS_MASK 0x0000FFFF
66 #define STANDARD_RIGHTS_MASK 0x00FF0000
67 #define GENERIC_RIGHTS_MASK 0xF0000000
69 /* Generic access rights */
71 #define GENERIC_RIGHT_ALL_ACCESS 0x10000000
72 #define GENERIC_RIGHT_EXECUTE_ACCESS 0x20000000
73 #define GENERIC_RIGHT_WRITE_ACCESS 0x40000000
74 #define GENERIC_RIGHT_READ_ACCESS 0x80000000
76 /* Standard access rights. */
78 #define STD_RIGHT_DELETE_ACCESS 0x00010000
79 #define STD_RIGHT_READ_CONTROL_ACCESS 0x00020000
80 #define STD_RIGHT_WRITE_DAC_ACCESS 0x00040000
81 #define STD_RIGHT_WRITE_OWNER_ACCESS 0x00080000
82 #define STD_RIGHT_SYNCHRONIZE_ACCESS 0x00100000
84 #define STD_RIGHT_ALL_ACCESS 0x001F0000
86 /* File Object specific access rights */
88 #define SA_RIGHT_FILE_READ_DATA 0x00000001
89 #define SA_RIGHT_FILE_WRITE_DATA 0x00000002
90 #define SA_RIGHT_FILE_APPEND_DATA 0x00000004
91 #define SA_RIGHT_FILE_READ_EA 0x00000008
92 #define SA_RIGHT_FILE_WRITE_EA 0x00000010
93 #define SA_RIGHT_FILE_EXECUTE 0x00000020
94 #define SA_RIGHT_FILE_DELETE_CHILD 0x00000040
95 #define SA_RIGHT_FILE_READ_ATTRIBUTES 0x00000080
96 #define SA_RIGHT_FILE_WRITE_ATTRIBUTES 0x00000100
98 #define SA_RIGHT_FILE_ALL_ACCESS 0x000001FF
100 #define GENERIC_RIGHTS_FILE_ALL_ACCESS \
101 (STANDARD_RIGHTS_REQUIRED_ACCESS| \
102 STD_RIGHT_SYNCHRONIZE_ACCESS | \
103 SA_RIGHT_FILE_ALL_ACCESS)
105 #define GENERIC_RIGHTS_FILE_READ \
106 (STANDARD_RIGHTS_READ_ACCESS | \
107 STD_RIGHT_SYNCHRONIZE_ACCESS | \
108 SA_RIGHT_FILE_READ_DATA | \
109 SA_RIGHT_FILE_READ_ATTRIBUTES | \
110 SA_RIGHT_FILE_READ_EA)
112 #define GENERIC_RIGHTS_FILE_WRITE \
113 (STANDARD_RIGHTS_WRITE_ACCESS | \
114 STD_RIGHT_SYNCHRONIZE_ACCESS | \
115 SA_RIGHT_FILE_WRITE_DATA | \
116 SA_RIGHT_FILE_WRITE_ATTRIBUTES | \
117 SA_RIGHT_FILE_WRITE_EA | \
118 SA_RIGHT_FILE_APPEND_DATA)
120 #define GENERIC_RIGHTS_FILE_EXECUTE \
121 (STANDARD_RIGHTS_EXECUTE_ACCESS | \
122 STD_RIGHT_SYNCHRONIZE_ACCESS | \
123 SA_RIGHT_FILE_READ_ATTRIBUTES | \
124 SA_RIGHT_FILE_EXECUTE)
126 #define GENERIC_RIGHTS_FILE_MODIFY \
127 (STANDARD_RIGHTS_MODIFY_ACCESS | \
128 STD_RIGHT_SYNCHRONIZE_ACCESS | \
129 STD_RIGHT_DELETE_ACCESS | \
130 SA_RIGHT_FILE_WRITE_ATTRIBUTES | \
131 SA_RIGHT_FILE_READ_ATTRIBUTES | \
132 SA_RIGHT_FILE_EXECUTE | \
133 SA_RIGHT_FILE_WRITE_EA | \
134 SA_RIGHT_FILE_READ_EA | \
135 SA_RIGHT_FILE_APPEND_DATA | \
136 SA_RIGHT_FILE_WRITE_DATA | \
137 SA_RIGHT_FILE_READ_DATA)
139 #endif /* _RPC_SECDES_H */