s3-security: move ALL_SECURITY_INFORMATION to the only user.
[Samba/ekacnet.git] / source3 / include / rpc_secdes.h
blob16791e072cb4f2a6c2764bfb0ed0a2ad5b6b8a09
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 /* A type to describe the mapping of generic access rights to object
28 specific access rights. */
30 struct generic_mapping {
31 uint32 generic_read;
32 uint32 generic_write;
33 uint32 generic_execute;
34 uint32 generic_all;
37 struct standard_mapping {
38 uint32 std_read;
39 uint32 std_write;
40 uint32 std_execute;
41 uint32 std_all;
45 /* Security Access Masks Rights */
47 #define SPECIFIC_RIGHTS_MASK 0x0000FFFF
48 #define STANDARD_RIGHTS_MASK 0x00FF0000
49 #define GENERIC_RIGHTS_MASK 0xF0000000
51 /* Generic access rights */
53 #define GENERIC_RIGHT_ALL_ACCESS 0x10000000
54 #define GENERIC_RIGHT_EXECUTE_ACCESS 0x20000000
55 #define GENERIC_RIGHT_WRITE_ACCESS 0x40000000
56 #define GENERIC_RIGHT_READ_ACCESS 0x80000000
58 /* Standard access rights. */
60 #define STD_RIGHT_DELETE_ACCESS 0x00010000
61 #define STD_RIGHT_READ_CONTROL_ACCESS 0x00020000
62 #define STD_RIGHT_WRITE_DAC_ACCESS 0x00040000
63 #define STD_RIGHT_WRITE_OWNER_ACCESS 0x00080000
64 #define STD_RIGHT_SYNCHRONIZE_ACCESS 0x00100000
66 #define STD_RIGHT_ALL_ACCESS 0x001F0000
68 /* File Object specific access rights */
70 #define SA_RIGHT_FILE_READ_DATA 0x00000001
71 #define SA_RIGHT_FILE_WRITE_DATA 0x00000002
72 #define SA_RIGHT_FILE_APPEND_DATA 0x00000004
73 #define SA_RIGHT_FILE_READ_EA 0x00000008
74 #define SA_RIGHT_FILE_WRITE_EA 0x00000010
75 #define SA_RIGHT_FILE_EXECUTE 0x00000020
76 #define SA_RIGHT_FILE_DELETE_CHILD 0x00000040
77 #define SA_RIGHT_FILE_READ_ATTRIBUTES 0x00000080
78 #define SA_RIGHT_FILE_WRITE_ATTRIBUTES 0x00000100
80 #define SA_RIGHT_FILE_ALL_ACCESS 0x000001FF
82 #define GENERIC_RIGHTS_FILE_ALL_ACCESS \
83 (STANDARD_RIGHTS_REQUIRED_ACCESS| \
84 STD_RIGHT_SYNCHRONIZE_ACCESS | \
85 SA_RIGHT_FILE_ALL_ACCESS)
87 #define GENERIC_RIGHTS_FILE_READ \
88 (STANDARD_RIGHTS_READ_ACCESS | \
89 STD_RIGHT_SYNCHRONIZE_ACCESS | \
90 SA_RIGHT_FILE_READ_DATA | \
91 SA_RIGHT_FILE_READ_ATTRIBUTES | \
92 SA_RIGHT_FILE_READ_EA)
94 #define GENERIC_RIGHTS_FILE_WRITE \
95 (STANDARD_RIGHTS_WRITE_ACCESS | \
96 STD_RIGHT_SYNCHRONIZE_ACCESS | \
97 SA_RIGHT_FILE_WRITE_DATA | \
98 SA_RIGHT_FILE_WRITE_ATTRIBUTES | \
99 SA_RIGHT_FILE_WRITE_EA | \
100 SA_RIGHT_FILE_APPEND_DATA)
102 #define GENERIC_RIGHTS_FILE_EXECUTE \
103 (STANDARD_RIGHTS_EXECUTE_ACCESS | \
104 STD_RIGHT_SYNCHRONIZE_ACCESS | \
105 SA_RIGHT_FILE_READ_ATTRIBUTES | \
106 SA_RIGHT_FILE_EXECUTE)
108 #define GENERIC_RIGHTS_FILE_MODIFY \
109 (STANDARD_RIGHTS_MODIFY_ACCESS | \
110 STD_RIGHT_SYNCHRONIZE_ACCESS | \
111 STD_RIGHT_DELETE_ACCESS | \
112 SA_RIGHT_FILE_WRITE_ATTRIBUTES | \
113 SA_RIGHT_FILE_READ_ATTRIBUTES | \
114 SA_RIGHT_FILE_EXECUTE | \
115 SA_RIGHT_FILE_WRITE_EA | \
116 SA_RIGHT_FILE_READ_EA | \
117 SA_RIGHT_FILE_APPEND_DATA | \
118 SA_RIGHT_FILE_WRITE_DATA | \
119 SA_RIGHT_FILE_READ_DATA)
121 #endif /* _RPC_SECDES_H */