Changes from APPLIANCE_HEAD:
[ira/wip.git] / source3 / include / rpc_secdes.h
index c2166c9a09f030274a883601c7556d7386557b4f..ab8a24d2d61afddebbd13b125f85dd700ca3a6c1 100644 (file)
@@ -2,9 +2,8 @@
    Unix SMB/Netbios implementation.
    Version 1.9.
    SMB parameters and setup
-   Copyright (C) Andrew Tridgell 1992-1997
-   Copyright (C) Luke Kenneth Casson Leighton 1996-1997
-   Copyright (C) Paul Ashton 1997
+   Copyright (C) Andrew Tridgell              1992-2000
+   Copyright (C) Luke Kenneth Casson Leighton 1996-2000
    
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
 #define SEC_RIGHTS_ENUM_SUBKEYS   0x00000008
 #define SEC_RIGHTS_NOTIFY         0x00000010
 #define SEC_RIGHTS_CREATE_LINK    0x00000020
-#define SEC_RIGHTS_DELETE         0x00010000
-#define SEC_RIGHTS_READ_CONTROL   0x00020000
-#define SEC_RIGHTS_WRITE_DAC      0x00040000
-#define SEC_RIGHTS_WRITE_OWNER    0x00080000
 
 #define SEC_RIGHTS_READ           0x00020019
 #define SEC_RIGHTS_FULL_CONTROL   0x000f003f
-
+#define SEC_RIGHTS_MAXIMUM_ALLOWED 0x02000000
 
 #define SEC_ACE_TYPE_ACCESS_ALLOWED    0x0
 #define SEC_ACE_TYPE_ACCESS_DENIED     0x1
@@ -48,6 +43,7 @@
 #define SEC_ACE_FLAG_CONTAINER_INHERIT 0x2
 #define SEC_ACE_FLAG_NO_PROPAGATE_INHERIT      0x4
 #define SEC_ACE_FLAG_INHERIT_ONLY      0x8
+#define SEC_ACE_FLAG_INHERITED_ACE     0x10 /* New for Windows 2000 */
 #define SEC_ACE_FLAG_VALID_INHERIT     0xf
 #define SEC_ACE_FLAG_SUCCESSFUL_ACCESS 0x40
 #define SEC_ACE_FLAG_FAILED_ACCESS     0x80
 #define SEC_DESC_DACL_DEFAULTED                0x0008
 #define SEC_DESC_SACL_PRESENT          0x0010
 #define SEC_DESC_SACL_DEFAULTED                0x0020
+/*
+ * New Windows 2000 bits.
+ */
+#define SE_DESC_DACL_AUTO_INHERIT_REQ 0x0100
+#define SE_DESC_SACL_AUTO_INHERIT_REQ 0x0200
+#define SE_DESC_DACL_AUTO_INHERITED 0x0400
+#define SE_DESC_SACL_AUTO_INHERITED 0x0800
+#define SE_DESC_DACL_PROTECTED         0x1000
+#define SE_DESC_SACL_PROTECTED         0x2000
+
 #define SEC_DESC_SELF_RELATIVE         0x8000
 
 /* security information */
 #define SACL_SECURITY_INFORMATION  0x00000008
 
 
-
+#ifndef _SEC_ACCESS
 /* SEC_ACCESS */
 typedef struct security_info_info
 {
        uint32 mask;
 
 } SEC_ACCESS;
+#define _SEC_ACCESS
+#endif
 
+#ifndef _SEC_ACE
 /* SEC_ACE */
 typedef struct security_ace_info
 {
@@ -87,21 +96,32 @@ typedef struct security_ace_info
        DOM_SID sid;
 
 } SEC_ACE;
+#define _SEC_ACE
+#endif
 
+#ifndef ACL_REVISION
+#define ACL_REVISION 0x3
+#endif
 
-#define MAX_SEC_ACES 16
-
+#ifndef _SEC_ACL
 /* SEC_ACL */
 typedef struct security_acl_info
 {
-       uint16 revision; /* 0x0002 */
+       uint16 revision; /* 0x0003 */
        uint16 size; /* size in bytes of the entire ACL structure */
        uint32 num_aces; /* number of Access Control Entries */
-       SEC_ACE *ace_list;
+
+       SEC_ACE *ace;
 
 } SEC_ACL;
+#define _SEC_ACL
+#endif
 
+#ifndef SEC_DESC_REVISION
+#define SEC_DESC_REVISION 0x1
+#endif
 
+#ifndef _SEC_DESC
 /* SEC_DESC */
 typedef struct security_descriptor_info
 {
@@ -119,7 +139,10 @@ typedef struct security_descriptor_info
        DOM_SID *grp_sid;
 
 } SEC_DESC;
+#define _SEC_DESC
+#endif
 
+#ifndef _SEC_DESC_BUF
 /* SEC_DESC_BUF */
 typedef struct sec_desc_buf_info
 {
@@ -130,5 +153,17 @@ typedef struct sec_desc_buf_info
        SEC_DESC *sec;
 
 } SEC_DESC_BUF;
+#define _SEC_DESC_BUF
+#endif
+
+/* A type to describe the mapping of generic access rights to object
+   specific access rights. */
+
+typedef struct generic_mapping {
+       uint32 generic_read;
+       uint32 generic_write;
+       uint32 generic_execute;
+       uint32 generic_all;
+} GENERIC_MAPPING;
 
 #endif /* _RPC_SECDES_H */