summaryrefslogtreecommitdiff
path: root/source3/include
diff options
context:
space:
mode:
authorLuke Leighton <lkcl@samba.org>1998-11-11 21:44:02 +0000
committerLuke Leighton <lkcl@samba.org>1998-11-11 21:44:02 +0000
commite35207f28de89cb3da88b47f4e70224e6b7f78e9 (patch)
treecb2375e598cfd7d15abe255c50c8073dcb16f723 /source3/include
parent4dd4f1798ee302e56dca98f80e252cfbd14cd388 (diff)
downloadsamba-e35207f28de89cb3da88b47f4e70224e6b7f78e9.tar.gz
samba-e35207f28de89cb3da88b47f4e70224e6b7f78e9.tar.bz2
samba-e35207f28de89cb3da88b47f4e70224e6b7f78e9.zip
security descriptor info, provided by jean-francois
(This used to be commit 719382a5579e8798812bbccd14a4c1ffd9003f7a)
Diffstat (limited to 'source3/include')
-rw-r--r--source3/include/proto.h2
-rw-r--r--source3/include/rpc_reg.h22
-rw-r--r--source3/include/rpc_secdes.h53
3 files changed, 64 insertions, 13 deletions
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 1ed983d1a0..cce55a47cd 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -1923,7 +1923,7 @@ void samr_io_r_chgpasswd_user(char *desc, SAMR_R_CHGPASSWD_USER *r_u, prs_struct
void sec_io_info(char *desc, SEC_INFO *t, prs_struct *ps, int depth);
void sec_io_ace(char *desc, SEC_ACE *t, prs_struct *ps, int depth);
void sec_io_acl(char *desc, SEC_ACL *t, prs_struct *ps, int depth);
-void sec_io_desc(char *desc, SEC_DESC *t, prs_struct *ps, int depth);
+void make_sec_desc_buf(SEC_DESC_BUF *buf, int len, SEC_DESC *data);
void sec_io_desc_buf(char *desc, SEC_DESC_BUF *sec, prs_struct *ps, int depth);
/*The following definitions come from rpc_parse/parse_srv.c */
diff --git a/source3/include/rpc_reg.h b/source3/include/rpc_reg.h
index 4eff16c3f4..59f3fb6f05 100644
--- a/source3/include/rpc_reg.h
+++ b/source3/include/rpc_reg.h
@@ -37,6 +37,7 @@
#define REG_DELETE_VALUE 0x08
#define REG_CREATE_VALUE 0x16
#define REG_GET_KEY_SEC 0x0c
+#define REG_SET_KEY_SEC 0x15
#define REG_ENUM_VALUE 0x0a
#define REG_OPEN_ENTRY 0x0f
#define REG_INFO 0x11
@@ -98,6 +99,27 @@ typedef struct r_reg_open_flush_key_info
} REG_R_FLUSH_KEY;
+/* REG_Q_SET_KEY_SEC */
+typedef struct q_reg_set_key_sec_info
+{
+ POLICY_HND pol; /* policy handle */
+
+ uint32 unknown; /* 0x0000 0004 */
+
+ uint32 ptr; /* pointer */
+ BUFHDR hdr_sec; /* header for security data */
+ SEC_DESC_BUF *data; /* security data */
+
+} REG_Q_SET_KEY_SEC;
+
+/* REG_R_SET_KEY_SEC */
+typedef struct r_reg_set_key_sec_info
+{
+ uint32 status;
+
+} REG_R_SET_KEY_SEC;
+
+
/* REG_Q_GET_KEY_SEC */
typedef struct q_reg_get_key_sec_info
{
diff --git a/source3/include/rpc_secdes.h b/source3/include/rpc_secdes.h
index 1b438d3dfe..b317ead5e1 100644
--- a/source3/include/rpc_secdes.h
+++ b/source3/include/rpc_secdes.h
@@ -38,6 +38,31 @@
#define SEC_RIGHTS_READ 0x00020019
#define SEC_RIGHTS_FULL_CONTROL 0x000f003f
+
+#define SEC_ACE_TYPE_ACCESS_ALLOWED 0x0
+#define SEC_ACE_TYPE_ACCESS_DENIED 0x1
+#define SEC_ACE_TYPE_SYSTEM_AUDIT 0x2
+#define SEC_ACE_TYPE_SYSTEM_ALARM 0x3
+
+#define SEC_ACE_FLAG_OBJECT_INHERIT 0x1
+#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_VALID_INHERIT 0xf
+#define SEC_ACE_FLAG_SUCCESSFUL_ACCESS 0x40
+#define SEC_ACE_FLAG_FAILED_ACCESS 0x80
+
+#define SEC_DESC_OWNER_DEFAULTED 0x0001
+#define SEC_DESC_GROUP_DEFAULTED 0x0002
+#define SEC_DESC_DACL_PRESENT 0x0004
+#define SEC_DESC_DACL_DEFAULTED 0x0008
+#define SEC_DESC_SACL_PRESENT 0x0010
+#define SEC_DESC_SACL_DEFAULTED 0x0020
+#define SEC_DESC_SELF_RELATIVE 0x8000
+
+
+
+
/* SEC_INFO */
typedef struct security_info_info
{
@@ -48,8 +73,9 @@ typedef struct security_info_info
/* SEC_ACE */
typedef struct security_ace_info
{
- uint16 unknown_1; /* 0x2000 */
- uint16 ace_size;
+ uint8 type;
+ uint8 flags;
+ uint16 size;
SEC_INFO info;
DOM_SID sid;
@@ -62,27 +88,30 @@ typedef struct security_ace_info
/* SEC_ACL */
typedef struct security_acl_info
{
- uint16 unknown_1; /* 0x0002 */
- uint16 acl_size; /* size in bytes of the entire ACL structure */
+ uint16 revision; /* 0x0002 */
+ uint16 size; /* size in bytes of the entire ACL structure */
uint32 num_aces; /* number of Access Control Entries */
SEC_ACE ace[MAX_SEC_ACES];
} SEC_ACL;
+
/* SEC_DESC */
typedef struct security_descriptor_info
{
- uint32 unknown_1; /* 0x8004 0001 */
+ uint16 revision; /* 0x0001 */
+ uint16 type; /* SEC_DESC_xxxx flags */
uint32 off_owner_sid; /* offset to owner sid */
- uint32 off_pnt_sid ; /* offset to parent? sid */
- uint32 off_unknown ; /* 0x0000 0000 */
- uint32 off_acl ; /* offset to list of permissions */
-
- SEC_ACL acl;
- DOM_SID owner_sid;
- DOM_SID parent_sid;
+ uint32 off_grp_sid ; /* offset to group sid */
+ uint32 off_sacl ; /* offset to system list of permissions */
+ uint32 off_dacl ; /* offset to list of permissions */
+
+ SEC_ACL dacl; /* user ACL */
+ SEC_ACL sacl; /* system ACL */
+ DOM_SID owner_sid;
+ DOM_SID grp_sid;
} SEC_DESC;