include/rpc_secdes.h

説明を見る。
00001 /* 
00002    Unix SMB/CIFS implementation.
00003    SMB parameters and setup
00004    Copyright (C) Andrew Tridgell              1992-2000
00005    Copyright (C) Luke Kenneth Casson Leighton 1996-2000
00006    
00007    This program is free software; you can redistribute it and/or modify
00008    it under the terms of the GNU General Public License as published by
00009    the Free Software Foundation; either version 2 of the License, or
00010    (at your option) any later version.
00011    
00012    This program is distributed in the hope that it will be useful,
00013    but WITHOUT ANY WARRANTY; without even the implied warranty of
00014    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015    GNU General Public License for more details.
00016    
00017    You should have received a copy of the GNU General Public License
00018    along with this program; if not, write to the Free Software
00019    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00020 */
00021 
00022 #ifndef _RPC_SECDES_H /* _RPC_SECDES_H */
00023 #define _RPC_SECDES_H 
00024 
00025 /* for ADS */
00026 #define SEC_RIGHTS_LIST_CONTENTS        0x4
00027 #define SEC_RIGHTS_LIST_OBJECT          0x80
00028 #define SEC_RIGHTS_READ_ALL_PROP        0x10
00029 #define SEC_RIGHTS_READ_PERMS           0x20000
00030 #define SEC_RIGHTS_WRITE_ALL_VALID      0x8
00031 #define SEC_RIGHTS_WRITE_ALL_PROP       0x20     
00032 #define SEC_RIGHTS_MODIFY_OWNER         0x80000
00033 #define SEC_RIGHTS_MODIFY_PERMS         0x40000
00034 #define SEC_RIGHTS_CREATE_CHILD         0x1
00035 #define SEC_RIGHTS_DELETE_CHILD         0x2
00036 #define SEC_RIGHTS_DELETE_SUBTREE       0x40
00037 #define SEC_RIGHTS_DELETE               0x10000 /* advanced/special/object/delete */
00038 #define SEC_RIGHTS_EXTENDED             0x100 /* change/reset password, receive/send as*/
00039 #define SEC_RIGHTS_CHANGE_PASSWD        SEC_RIGHTS_EXTENDED
00040 #define SEC_RIGHTS_RESET_PASSWD         SEC_RIGHTS_EXTENDED
00041 #define SEC_RIGHTS_FULL_CTRL            0xf01ff
00042 
00043 #define SEC_ACE_OBJECT_PRESENT           0x00000001 /* thanks for Jim McDonough <jmcd@us.ibm.com> */
00044 #define SEC_ACE_OBJECT_INHERITED_PRESENT 0x00000002
00045 
00046 /*
00047  * New Windows 2000 bits.
00048  */
00049 #define SE_DESC_DACL_AUTO_INHERIT_REQ   0x0100
00050 #define SE_DESC_SACL_AUTO_INHERIT_REQ   0x0200
00051 #define SE_DESC_DACL_AUTO_INHERITED     0x0400
00052 #define SE_DESC_SACL_AUTO_INHERITED     0x0800
00053 #define SE_DESC_DACL_PROTECTED          0x1000
00054 #define SE_DESC_SACL_PROTECTED          0x2000
00055 
00056 /* security information */
00057 #define OWNER_SECURITY_INFORMATION      0x00000001
00058 #define GROUP_SECURITY_INFORMATION      0x00000002
00059 #define DACL_SECURITY_INFORMATION       0x00000004
00060 #define SACL_SECURITY_INFORMATION       0x00000008
00061 /* Extra W2K flags. */
00062 #define UNPROTECTED_SACL_SECURITY_INFORMATION   0x10000000
00063 #define UNPROTECTED_DACL_SECURITY_INFORMATION   0x20000000
00064 #define PROTECTED_SACL_SECURITY_INFORMATION     0x40000000
00065 #define PROTECTED_DACL_SECURITY_INFORMATION     0x80000000
00066 
00067 #define ALL_SECURITY_INFORMATION (OWNER_SECURITY_INFORMATION|GROUP_SECURITY_INFORMATION|\
00068                                         DACL_SECURITY_INFORMATION|SACL_SECURITY_INFORMATION|\
00069                                         UNPROTECTED_SACL_SECURITY_INFORMATION|\
00070                                         UNPROTECTED_DACL_SECURITY_INFORMATION|\
00071                                         PROTECTED_SACL_SECURITY_INFORMATION|\
00072                                         PROTECTED_DACL_SECURITY_INFORMATION)
00073 
00074 /* SEC_ACCESS */
00075 typedef uint32 SEC_ACCESS;
00076 
00077 /* SEC_ACE */
00078 typedef struct security_ace_info {
00079         uint8 type;  /* xxxx_xxxx_ACE_TYPE - e.g allowed / denied etc */
00080         uint8 flags; /* xxxx_INHERIT_xxxx - e.g OBJECT_INHERIT_ACE */
00081         uint16 size;
00082 
00083         SEC_ACCESS access_mask;
00084 
00085         /* this stuff may be present when type is XXXX_TYPE_XXXX_OBJECT */
00086         uint32  obj_flags; /* xxxx_ACE_OBJECT_xxxx e.g present/inherited present etc */
00087         struct GUID obj_guid;  /* object GUID */
00088         struct GUID inh_guid;  /* inherited object GUID */              
00089         /* eof object stuff */
00090 
00091         DOM_SID trustee;
00092 
00093 } SEC_ACE;
00094 #define  SEC_ACE_HEADER_SIZE (2 * sizeof(uint8) + sizeof(uint16) + sizeof(uint32))
00095 
00096 #ifndef ACL_REVISION
00097 #define ACL_REVISION 0x3
00098 #endif
00099 
00100 #ifndef _SEC_ACL
00101 /* SEC_ACL */
00102 typedef struct security_acl_info {
00103         uint16 revision; /* 0x0003 */
00104         uint16 size; /* size in bytes of the entire ACL structure */
00105         uint32 num_aces; /* number of Access Control Entries */
00106 
00107         SEC_ACE *aces;
00108 
00109 } SEC_ACL;
00110 #define  SEC_ACL_HEADER_SIZE (2 * sizeof(uint16) + sizeof(uint32))
00111 #define _SEC_ACL
00112 #endif
00113 
00114 #ifndef SEC_DESC_REVISION
00115 #define SEC_DESC_REVISION 0x1
00116 #endif
00117 
00118 #ifndef _SEC_DESC
00119 /* SEC_DESC */
00120 typedef struct security_descriptor_info {
00121         uint16 revision; /* 0x0001 */
00122         uint16 type;     /* SEC_DESC_xxxx flags */
00123 
00124         uint32 off_owner_sid; /* offset to owner sid */
00125         uint32 off_grp_sid  ; /* offset to group sid */
00126         uint32 off_sacl     ; /* offset to system list of permissions */
00127         uint32 off_dacl     ; /* offset to list of permissions */
00128 
00129         SEC_ACL *dacl; /* user ACL */
00130         SEC_ACL *sacl; /* system ACL */
00131         DOM_SID *owner_sid; 
00132         DOM_SID *group_sid;
00133 
00134 } SEC_DESC;
00135 #define  SEC_DESC_HEADER_SIZE (2 * sizeof(uint16) + 4 * sizeof(uint32))
00136 #define _SEC_DESC
00137 #endif
00138 
00139 #ifndef _SEC_DESC_BUF
00140 /* SEC_DESC_BUF */
00141 typedef struct sec_desc_buf_info {
00142         uint32 max_len;
00143         uint32 ptr;
00144         uint32 len;
00145 
00146         SEC_DESC *sec;
00147 
00148 } SEC_DESC_BUF;
00149 #define _SEC_DESC_BUF
00150 #endif
00151 
00152 /* A type to describe the mapping of generic access rights to object
00153    specific access rights. */
00154 
00155 typedef struct generic_mapping {
00156         uint32 generic_read;
00157         uint32 generic_write;
00158         uint32 generic_execute;
00159         uint32 generic_all;
00160 } GENERIC_MAPPING;
00161 
00162 typedef struct standard_mapping {
00163         uint32 std_read;
00164         uint32 std_write;
00165         uint32 std_execute;
00166         uint32 std_all;
00167 } STANDARD_MAPPING;
00168 
00169 
00170 /* Security Access Masks Rights */
00171 
00172 #define SPECIFIC_RIGHTS_MASK    0x0000FFFF
00173 #define STANDARD_RIGHTS_MASK    0x00FF0000
00174 #define GENERIC_RIGHTS_MASK     0xF0000000
00175 
00176 #define SEC_RIGHT_SYSTEM_SECURITY       0x01000000
00177 #define SEC_RIGHT_MAXIMUM_ALLOWED       0x02000000
00178 
00179 /* Generic access rights */
00180 
00181 #define GENERIC_RIGHT_ALL_ACCESS        0x10000000
00182 #define GENERIC_RIGHT_EXECUTE_ACCESS    0x20000000
00183 #define GENERIC_RIGHT_WRITE_ACCESS      0x40000000
00184 #define GENERIC_RIGHT_READ_ACCESS       0x80000000
00185 
00186 /* Standard access rights. */
00187 
00188 #define STD_RIGHT_DELETE_ACCESS         0x00010000
00189 #define STD_RIGHT_READ_CONTROL_ACCESS   0x00020000
00190 #define STD_RIGHT_WRITE_DAC_ACCESS      0x00040000
00191 #define STD_RIGHT_WRITE_OWNER_ACCESS    0x00080000
00192 #define STD_RIGHT_SYNCHRONIZE_ACCESS    0x00100000
00193 
00194 #define STD_RIGHT_ALL_ACCESS            0x001F0000
00195 
00196 /* Combinations of standard masks. */
00197 #define STANDARD_RIGHTS_ALL_ACCESS      STD_RIGHT_ALL_ACCESS /* 0x001f0000 */
00198 #define STANDARD_RIGHTS_MODIFY_ACCESS   STD_RIGHT_READ_CONTROL_ACCESS /* 0x00020000 */
00199 #define STANDARD_RIGHTS_EXECUTE_ACCESS  STD_RIGHT_READ_CONTROL_ACCESS /* 0x00020000 */
00200 #define STANDARD_RIGHTS_READ_ACCESS     STD_RIGHT_READ_CONTROL_ACCESS /* 0x00020000 */
00201 #define STANDARD_RIGHTS_WRITE_ACCESS \
00202                 (STD_RIGHT_WRITE_OWNER_ACCESS   | \
00203                  STD_RIGHT_WRITE_DAC_ACCESS     | \
00204                  STD_RIGHT_DELETE_ACCESS)       /* 0x000d0000 */
00205 #define STANDARD_RIGHTS_REQUIRED_ACCESS \
00206                 (STD_RIGHT_DELETE_ACCESS        | \
00207                 STD_RIGHT_READ_CONTROL_ACCESS   | \
00208                 STD_RIGHT_WRITE_DAC_ACCESS      | \
00209                 STD_RIGHT_WRITE_OWNER_ACCESS)   /* 0x000f0000 */
00210 
00211 /* File Object specific access rights */
00212 
00213 #define SA_RIGHT_FILE_READ_DATA         0x00000001
00214 #define SA_RIGHT_FILE_WRITE_DATA        0x00000002
00215 #define SA_RIGHT_FILE_APPEND_DATA       0x00000004
00216 #define SA_RIGHT_FILE_READ_EA           0x00000008
00217 #define SA_RIGHT_FILE_WRITE_EA          0x00000010
00218 #define SA_RIGHT_FILE_EXECUTE           0x00000020
00219 #define SA_RIGHT_FILE_DELETE_CHILD      0x00000040
00220 #define SA_RIGHT_FILE_READ_ATTRIBUTES   0x00000080
00221 #define SA_RIGHT_FILE_WRITE_ATTRIBUTES  0x00000100
00222 
00223 #define SA_RIGHT_FILE_ALL_ACCESS        0x000001FF
00224 
00225 #define GENERIC_RIGHTS_FILE_ALL_ACCESS \
00226                 (STANDARD_RIGHTS_REQUIRED_ACCESS| \
00227                 STD_RIGHT_SYNCHRONIZE_ACCESS    | \
00228                 SA_RIGHT_FILE_ALL_ACCESS)
00229 
00230 #define GENERIC_RIGHTS_FILE_READ        \
00231                 (STANDARD_RIGHTS_READ_ACCESS    | \
00232                 STD_RIGHT_SYNCHRONIZE_ACCESS    | \
00233                 SA_RIGHT_FILE_READ_DATA         | \
00234                 SA_RIGHT_FILE_READ_ATTRIBUTES   | \
00235                 SA_RIGHT_FILE_READ_EA)
00236 
00237 #define GENERIC_RIGHTS_FILE_WRITE \
00238                 (STANDARD_RIGHTS_WRITE_ACCESS   | \
00239                 STD_RIGHT_SYNCHRONIZE_ACCESS    | \
00240                 SA_RIGHT_FILE_WRITE_DATA        | \
00241                 SA_RIGHT_FILE_WRITE_ATTRIBUTES  | \
00242                 SA_RIGHT_FILE_WRITE_EA          | \
00243                 SA_RIGHT_FILE_APPEND_DATA)
00244 
00245 #define GENERIC_RIGHTS_FILE_EXECUTE \
00246                 (STANDARD_RIGHTS_EXECUTE_ACCESS | \
00247                 STD_RIGHT_SYNCHRONIZE_ACCESS    | \
00248                 SA_RIGHT_FILE_READ_ATTRIBUTES   | \
00249                 SA_RIGHT_FILE_EXECUTE)            
00250 
00251 #define GENERIC_RIGHTS_FILE_MODIFY \
00252                 (STANDARD_RIGHTS_MODIFY_ACCESS  | \
00253                 STD_RIGHT_SYNCHRONIZE_ACCESS    | \
00254                 STD_RIGHT_DELETE_ACCESS         | \
00255                 SA_RIGHT_FILE_WRITE_ATTRIBUTES  | \
00256                 SA_RIGHT_FILE_READ_ATTRIBUTES   | \
00257                 SA_RIGHT_FILE_EXECUTE           | \
00258                 SA_RIGHT_FILE_WRITE_EA          | \
00259                 SA_RIGHT_FILE_READ_EA           | \
00260                 SA_RIGHT_FILE_APPEND_DATA       | \
00261                 SA_RIGHT_FILE_WRITE_DATA        | \
00262                 SA_RIGHT_FILE_READ_DATA)
00263 
00264 /* SAM server specific access rights */
00265 
00266 #define SA_RIGHT_SAM_CONNECT_SERVER     0x00000001
00267 #define SA_RIGHT_SAM_SHUTDOWN_SERVER    0x00000002
00268 #define SA_RIGHT_SAM_INITIALISE_SERVER  0x00000004
00269 #define SA_RIGHT_SAM_CREATE_DOMAIN      0x00000008
00270 #define SA_RIGHT_SAM_ENUM_DOMAINS       0x00000010
00271 #define SA_RIGHT_SAM_OPEN_DOMAIN        0x00000020
00272 
00273 #define SA_RIGHT_SAM_ALL_ACCESS         0x0000003F
00274 
00275 #define GENERIC_RIGHTS_SAM_ALL_ACCESS \
00276                 (STANDARD_RIGHTS_REQUIRED_ACCESS| \
00277                 SA_RIGHT_SAM_ALL_ACCESS)
00278 
00279 #define GENERIC_RIGHTS_SAM_READ \
00280                 (STANDARD_RIGHTS_READ_ACCESS    | \
00281                 SA_RIGHT_SAM_ENUM_DOMAINS)
00282 
00283 #define GENERIC_RIGHTS_SAM_WRITE \
00284                 (STANDARD_RIGHTS_WRITE_ACCESS   | \
00285                 SA_RIGHT_SAM_CREATE_DOMAIN      | \
00286                 SA_RIGHT_SAM_INITIALISE_SERVER  | \
00287                 SA_RIGHT_SAM_SHUTDOWN_SERVER)
00288 
00289 #define GENERIC_RIGHTS_SAM_EXECUTE \
00290                 (STANDARD_RIGHTS_EXECUTE_ACCESS | \
00291                 SA_RIGHT_SAM_OPEN_DOMAIN        | \
00292                 SA_RIGHT_SAM_CONNECT_SERVER)            
00293 
00294 
00295 /* Domain Object specific access rights */
00296 
00297 #define SA_RIGHT_DOMAIN_LOOKUP_INFO_1           0x00000001
00298 #define SA_RIGHT_DOMAIN_SET_INFO_1              0x00000002
00299 #define SA_RIGHT_DOMAIN_LOOKUP_INFO_2           0x00000004
00300 #define SA_RIGHT_DOMAIN_SET_INFO_2              0x00000008
00301 #define SA_RIGHT_DOMAIN_CREATE_USER             0x00000010
00302 #define SA_RIGHT_DOMAIN_CREATE_GROUP            0x00000020
00303 #define SA_RIGHT_DOMAIN_CREATE_ALIAS            0x00000040
00304 #define SA_RIGHT_DOMAIN_LOOKUP_ALIAS_BY_MEM     0x00000080
00305 #define SA_RIGHT_DOMAIN_ENUM_ACCOUNTS           0x00000100
00306 #define SA_RIGHT_DOMAIN_OPEN_ACCOUNT            0x00000200
00307 #define SA_RIGHT_DOMAIN_SET_INFO_3              0x00000400
00308 
00309 #define SA_RIGHT_DOMAIN_ALL_ACCESS              0x000007FF
00310 
00311 #define GENERIC_RIGHTS_DOMAIN_ALL_ACCESS \
00312                 (STANDARD_RIGHTS_REQUIRED_ACCESS| \
00313                 SA_RIGHT_DOMAIN_ALL_ACCESS)
00314 
00315 #define GENERIC_RIGHTS_DOMAIN_READ \
00316                 (STANDARD_RIGHTS_READ_ACCESS            | \
00317                 SA_RIGHT_DOMAIN_LOOKUP_ALIAS_BY_MEM     | \
00318                 SA_RIGHT_DOMAIN_LOOKUP_INFO_2)
00319 
00320 #define GENERIC_RIGHTS_DOMAIN_WRITE \
00321                 (STANDARD_RIGHTS_WRITE_ACCESS   | \
00322                 SA_RIGHT_DOMAIN_SET_INFO_3      | \
00323                 SA_RIGHT_DOMAIN_CREATE_ALIAS    | \
00324                 SA_RIGHT_DOMAIN_CREATE_GROUP    | \
00325                 SA_RIGHT_DOMAIN_CREATE_USER     | \
00326                 SA_RIGHT_DOMAIN_SET_INFO_2      | \
00327                 SA_RIGHT_DOMAIN_SET_INFO_1)
00328 
00329 #define GENERIC_RIGHTS_DOMAIN_EXECUTE \
00330                 (STANDARD_RIGHTS_EXECUTE_ACCESS | \
00331                 SA_RIGHT_DOMAIN_OPEN_ACCOUNT    | \
00332                 SA_RIGHT_DOMAIN_ENUM_ACCOUNTS   | \
00333                 SA_RIGHT_DOMAIN_LOOKUP_INFO_1)            
00334 
00335 
00336 /* User Object specific access rights */
00337 
00338 #define SA_RIGHT_USER_GET_NAME_ETC      0x00000001
00339 #define SA_RIGHT_USER_GET_LOCALE        0x00000002
00340 #define SA_RIGHT_USER_SET_LOC_COM       0x00000004
00341 #define SA_RIGHT_USER_GET_LOGONINFO     0x00000008
00342 #define SA_RIGHT_USER_ACCT_FLAGS_EXPIRY 0x00000010
00343 #define SA_RIGHT_USER_SET_ATTRIBUTES    0x00000020
00344 #define SA_RIGHT_USER_CHANGE_PASSWORD   0x00000040
00345 #define SA_RIGHT_USER_SET_PASSWORD      0x00000080
00346 #define SA_RIGHT_USER_GET_GROUPS        0x00000100
00347 #define SA_RIGHT_USER_READ_GROUP_MEM    0x00000200
00348 #define SA_RIGHT_USER_CHANGE_GROUP_MEM  0x00000400
00349 
00350 #define SA_RIGHT_USER_ALL_ACCESS        0x000007FF
00351 
00352 #define GENERIC_RIGHTS_USER_ALL_ACCESS \
00353                 (STANDARD_RIGHTS_REQUIRED_ACCESS| \
00354                 SA_RIGHT_USER_ALL_ACCESS)       /* 0x000f07ff */
00355 
00356 #define GENERIC_RIGHTS_USER_READ \
00357                 (STANDARD_RIGHTS_READ_ACCESS    | \
00358                 SA_RIGHT_USER_READ_GROUP_MEM    | \
00359                 SA_RIGHT_USER_GET_GROUPS        | \
00360                 SA_RIGHT_USER_ACCT_FLAGS_EXPIRY | \
00361                 SA_RIGHT_USER_GET_LOGONINFO     | \
00362                 SA_RIGHT_USER_GET_LOCALE)       /* 0x0002031a */
00363 
00364 #define GENERIC_RIGHTS_USER_WRITE \
00365                 (STANDARD_RIGHTS_WRITE_ACCESS   | \
00366                 SA_RIGHT_USER_CHANGE_PASSWORD   | \
00367                 SA_RIGHT_USER_SET_LOC_COM       | \
00368                 SA_RIGHT_USER_SET_ATTRIBUTES    | \
00369                 SA_RIGHT_USER_SET_PASSWORD      | \
00370                 SA_RIGHT_USER_CHANGE_GROUP_MEM) /* 0x000204e4 */
00371 
00372 #define GENERIC_RIGHTS_USER_EXECUTE \
00373                 (STANDARD_RIGHTS_EXECUTE_ACCESS | \
00374                 SA_RIGHT_USER_CHANGE_PASSWORD   | \
00375                 SA_RIGHT_USER_GET_NAME_ETC )    /* 0x00020041 */
00376 
00377 
00378 /* Group Object specific access rights */
00379 
00380 #define SA_RIGHT_GROUP_LOOKUP_INFO      0x00000001
00381 #define SA_RIGHT_GROUP_SET_INFO         0x00000002
00382 #define SA_RIGHT_GROUP_ADD_MEMBER       0x00000004
00383 #define SA_RIGHT_GROUP_REMOVE_MEMBER    0x00000008
00384 #define SA_RIGHT_GROUP_GET_MEMBERS      0x00000010
00385 
00386 #define SA_RIGHT_GROUP_ALL_ACCESS       0x0000001F
00387 
00388 #define GENERIC_RIGHTS_GROUP_ALL_ACCESS \
00389                 (STANDARD_RIGHTS_REQUIRED_ACCESS| \
00390                 SA_RIGHT_GROUP_ALL_ACCESS)      /* 0x000f001f */
00391 
00392 #define GENERIC_RIGHTS_GROUP_READ \
00393                 (STANDARD_RIGHTS_READ_ACCESS    | \
00394                 SA_RIGHT_GROUP_GET_MEMBERS)     /* 0x00020010 */
00395 
00396 #define GENERIC_RIGHTS_GROUP_WRITE \
00397                 (STANDARD_RIGHTS_WRITE_ACCESS   | \
00398                 SA_RIGHT_GROUP_REMOVE_MEMBER    | \
00399                 SA_RIGHT_GROUP_ADD_MEMBER       | \
00400                 SA_RIGHT_GROUP_SET_INFO )       /* 0x0002000e */
00401 
00402 #define GENERIC_RIGHTS_GROUP_EXECUTE \
00403                 (STANDARD_RIGHTS_EXECUTE_ACCESS | \
00404                 SA_RIGHT_GROUP_LOOKUP_INFO)     /* 0x00020001 */
00405 
00406 
00407 /* Alias Object specific access rights */
00408 
00409 #define SA_RIGHT_ALIAS_ADD_MEMBER       0x00000001
00410 #define SA_RIGHT_ALIAS_REMOVE_MEMBER    0x00000002
00411 #define SA_RIGHT_ALIAS_GET_MEMBERS      0x00000004
00412 #define SA_RIGHT_ALIAS_LOOKUP_INFO      0x00000008
00413 #define SA_RIGHT_ALIAS_SET_INFO         0x00000010
00414 
00415 #define SA_RIGHT_ALIAS_ALL_ACCESS       0x0000001F
00416 
00417 #define GENERIC_RIGHTS_ALIAS_ALL_ACCESS \
00418                 (STANDARD_RIGHTS_REQUIRED_ACCESS| \
00419                 SA_RIGHT_ALIAS_ALL_ACCESS)      /* 0x000f001f */
00420 
00421 #define GENERIC_RIGHTS_ALIAS_READ \
00422                 (STANDARD_RIGHTS_READ_ACCESS    | \
00423                 SA_RIGHT_ALIAS_GET_MEMBERS )    /* 0x00020004 */
00424 
00425 #define GENERIC_RIGHTS_ALIAS_WRITE \
00426                 (STANDARD_RIGHTS_WRITE_ACCESS   | \
00427                 SA_RIGHT_ALIAS_REMOVE_MEMBER    | \
00428                 SA_RIGHT_ALIAS_ADD_MEMBER       | \
00429                 SA_RIGHT_ALIAS_SET_INFO )       /* 0x00020013 */
00430 
00431 #define GENERIC_RIGHTS_ALIAS_EXECUTE \
00432                 (STANDARD_RIGHTS_EXECUTE_ACCESS | \
00433                 SA_RIGHT_ALIAS_LOOKUP_INFO )    /* 0x00020008 */
00434 
00435 /*
00436  * Acces bits for the svcctl objects
00437  */
00438 
00439 /* Service Control Manager Bits */ 
00440 
00441 #define SC_RIGHT_MGR_CONNECT                    0x0001
00442 #define SC_RIGHT_MGR_CREATE_SERVICE             0x0002
00443 #define SC_RIGHT_MGR_ENUMERATE_SERVICE          0x0004
00444 #define SC_RIGHT_MGR_LOCK                       0x0008
00445 #define SC_RIGHT_MGR_QUERY_LOCK_STATUS          0x0010
00446 #define SC_RIGHT_MGR_MODIFY_BOOT_CONFIG         0x0020
00447 
00448 #define SC_MANAGER_READ_ACCESS \
00449         ( STANDARD_RIGHTS_READ_ACCESS           | \
00450           SC_RIGHT_MGR_CONNECT                  | \
00451           SC_RIGHT_MGR_ENUMERATE_SERVICE        | \
00452           SC_RIGHT_MGR_QUERY_LOCK_STATUS )
00453 
00454 #define SC_MANAGER_EXECUTE_ACCESS SC_MANAGER_READ_ACCESS
00455 
00456 #define SC_MANAGER_WRITE_ACCESS \
00457         ( STANDARD_RIGHTS_REQUIRED_ACCESS       | \
00458           SC_MANAGER_READ_ACCESS                | \
00459           SC_RIGHT_MGR_CREATE_SERVICE           | \
00460           SC_RIGHT_MGR_LOCK                     | \
00461           SC_RIGHT_MGR_MODIFY_BOOT_CONFIG )
00462 
00463 #define SC_MANAGER_ALL_ACCESS SC_MANAGER_WRITE_ACCESS
00464 
00465 /* Service Object Bits */ 
00466 
00467 #define SC_RIGHT_SVC_QUERY_CONFIG               0x0001
00468 #define SC_RIGHT_SVC_CHANGE_CONFIG              0x0002
00469 #define SC_RIGHT_SVC_QUERY_STATUS               0x0004
00470 #define SC_RIGHT_SVC_ENUMERATE_DEPENDENTS       0x0008
00471 #define SC_RIGHT_SVC_START                      0x0010
00472 #define SC_RIGHT_SVC_STOP                       0x0020
00473 #define SC_RIGHT_SVC_PAUSE_CONTINUE             0x0040
00474 #define SC_RIGHT_SVC_INTERROGATE                0x0080
00475 #define SC_RIGHT_SVC_USER_DEFINED_CONTROL       0x0100
00476 
00477 #define SERVICE_READ_ACCESS \
00478         ( STANDARD_RIGHTS_READ_ACCESS           | \
00479           SC_RIGHT_SVC_ENUMERATE_DEPENDENTS     | \
00480           SC_RIGHT_SVC_INTERROGATE              | \
00481           SC_RIGHT_SVC_QUERY_CONFIG             | \
00482           SC_RIGHT_SVC_QUERY_STATUS             | \
00483           SC_RIGHT_SVC_USER_DEFINED_CONTROL )
00484 
00485 #define SERVICE_EXECUTE_ACCESS \
00486         ( SERVICE_READ_ACCESS                   | \
00487           SC_RIGHT_SVC_START                    | \
00488           SC_RIGHT_SVC_STOP                     | \
00489           SC_RIGHT_SVC_PAUSE_CONTINUE )
00490 
00491 #define SERVICE_WRITE_ACCESS \
00492         ( STANDARD_RIGHTS_REQUIRED_ACCESS       | \
00493           SERVICE_READ_ACCESS                   | \
00494           SERVICE_EXECUTE_ACCESS                | \
00495           SC_RIGHT_SVC_CHANGE_CONFIG )
00496 
00497 #define SERVICE_ALL_ACCESS SERVICE_WRITE_ACCESS
00498 
00499            
00500 
00501 /*
00502  * Access Bits for registry ACLS
00503  */
00504 
00505 /* used by registry ACLs */
00506 
00507 #define SEC_RIGHTS_QUERY_VALUE          0x00000001
00508 #define SEC_RIGHTS_SET_VALUE            0x00000002
00509 #define SEC_RIGHTS_CREATE_SUBKEY        0x00000004
00510 #define SEC_RIGHTS_ENUM_SUBKEYS         0x00000008
00511 #define SEC_RIGHTS_NOTIFY               0x00000010
00512 #define SEC_RIGHTS_CREATE_LINK          0x00000020
00513 #define SEC_RIGHTS_MAXIMUM_ALLOWED      0x02000000
00514 
00515 
00516 #define REG_KEY_READ \
00517         ( STANDARD_RIGHTS_READ_ACCESS           |\
00518           SEC_RIGHTS_QUERY_VALUE                |\
00519           SEC_RIGHTS_ENUM_SUBKEYS               |\
00520           SEC_RIGHTS_NOTIFY )
00521           
00522 #define REG_KEY_EXECUTE REG_KEY_READ
00523 
00524 #define REG_KEY_WRITE \
00525         ( STANDARD_RIGHTS_WRITE_ACCESS          |\
00526           SEC_RIGHTS_SET_VALUE                  |\
00527           SEC_RIGHTS_CREATE_SUBKEY )
00528 
00529 #define REG_KEY_ALL \
00530         ( STANDARD_RIGHTS_REQUIRED_ACCESS       |\
00531           REG_KEY_READ                          |\
00532           REG_KEY_WRITE                         |\
00533           SEC_RIGHTS_CREATE_LINK )
00534 
00535 
00536 #endif /* _RPC_SECDES_H */

Sambaに対してSat Aug 29 21:22:56 2009に生成されました。  doxygen 1.4.7