summaryrefslogtreecommitdiff
path: root/source3/include
diff options
context:
space:
mode:
authorLuke Leighton <lkcl@samba.org>1999-08-03 20:30:25 +0000
committerLuke Leighton <lkcl@samba.org>1999-08-03 20:30:25 +0000
commit8598bf2a7f0f71ae7a023aac054c4df42b969ce6 (patch)
tree53352e656e5d01de5a2711b62ac1239979f6d53f /source3/include
parent9c593512155a4e1d9eb01ac63d4458df59b7357d (diff)
downloadsamba-8598bf2a7f0f71ae7a023aac054c4df42b969ce6.tar.gz
samba-8598bf2a7f0f71ae7a023aac054c4df42b969ce6.tar.bz2
samba-8598bf2a7f0f71ae7a023aac054c4df42b969ce6.zip
reverted jeremy's c++-like security descriptor modifications as the
simplest method to get rpcclient's reggetsec command working. the buffers passed as arguments in do_reg_get_key_sec() do need to be locally allocated not dynamically allocated, as two calls to reg_get_key_sec() are needed. on the first, the server fills in the size of the security descriptor buffer needed. on the second, the server fills in the security descriptor buffer. (This used to be commit b2d9cbef6f65bb696df8d8f49aa0c240e0bb1f50)
Diffstat (limited to 'source3/include')
-rw-r--r--source3/include/proto.h46
-rw-r--r--source3/include/rpc_secdes.h3
2 files changed, 22 insertions, 27 deletions
diff --git a/source3/include/proto.h b/source3/include/proto.h
index a09aa39ed2..e64865b85c 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -535,7 +535,6 @@ void sid_copy(DOM_SID *sid1, const DOM_SID *sid2);
BOOL sid_front_equal(const DOM_SID *sid1, const DOM_SID *sid2);
BOOL sid_equal(const DOM_SID *sid1, const DOM_SID *sid2);
int sid_size(const DOM_SID *sid);
-DOM_SID *sid_dup(DOM_SID *src);
/*The following definitions come from lib/util_sock.c */
@@ -1796,10 +1795,9 @@ BOOL do_reg_unknown_1a(struct cli_state *cli, uint16 fnum, POLICY_HND *hnd, uint
BOOL do_reg_query_info(struct cli_state *cli, uint16 fnum, POLICY_HND *hnd,
char *type, uint32 *unk_0, uint32 *unk_1);
BOOL do_reg_set_key_sec(struct cli_state *cli, uint16 fnum, POLICY_HND *hnd,
- SEC_DESC_BUF *sec_buf);
+ uint32 sec_buf_size, SEC_DESC *sec_buf);
BOOL do_reg_get_key_sec(struct cli_state *cli, uint16 fnum, POLICY_HND *hnd,
- uint32 *sec_buf_size,
- SEC_DESC_BUF **ppsec_desc_buf);
+ uint32 *sec_buf_size, SEC_DESC_BUF *sec_buf);
BOOL do_reg_delete_val(struct cli_state *cli, uint16 fnum, POLICY_HND *hnd, char *val_name);
BOOL do_reg_delete_key(struct cli_state *cli, uint16 fnum, POLICY_HND *hnd, char *key_name);
BOOL do_reg_create_key(struct cli_state *cli, uint16 fnum, POLICY_HND *hnd,
@@ -2105,7 +2103,7 @@ void smb_io_lookup_level(char *desc, LOOKUP_LEVEL *level, prs_struct *ps, int de
uint32 get_enum_hnd(ENUM_HND *enh);
void make_enum_hnd(ENUM_HND *enh, uint32 hnd);
void smb_io_enum_hnd(char *desc, ENUM_HND *hnd, prs_struct *ps, int depth);
-BOOL smb_io_dom_sid(char *desc, DOM_SID *sid, prs_struct *ps, int depth);
+void smb_io_dom_sid(char *desc, DOM_SID *sid, prs_struct *ps, int depth);
void make_dom_sid2(DOM_SID2 *sid2, DOM_SID *sid);
void smb_io_dom_sid2(char *desc, DOM_SID2 *sid, prs_struct *ps, int depth);
void make_str_hdr(STRHDR *hdr, int max_len, int len, uint32 buffer);
@@ -2300,7 +2298,8 @@ void reg_io_r_flush_key(char *desc, REG_R_FLUSH_KEY *r_r, prs_struct *ps, int d
void make_reg_q_create_key(REG_Q_CREATE_KEY *q_c, POLICY_HND *hnd,
char *name, char *class,
SEC_ACCESS *sam_access,
- SEC_DESC_BUF *sec_buf);
+ SEC_DESC_BUF *sec_buf,
+ int sec_len, SEC_DESC *sec);
void reg_io_q_create_key(char *desc, REG_Q_CREATE_KEY *r_q, prs_struct *ps, int depth);
void reg_io_r_create_key(char *desc, REG_R_CREATE_KEY *r_r, prs_struct *ps, int depth);
void make_reg_q_delete_val(REG_Q_DELETE_VALUE *q_c, POLICY_HND *hnd,
@@ -2326,11 +2325,11 @@ void make_reg_q_close(REG_Q_CLOSE *q_c, POLICY_HND *hnd);
void reg_io_q_close(char *desc, REG_Q_CLOSE *q_u, prs_struct *ps, int depth);
void reg_io_r_close(char *desc, REG_R_CLOSE *r_u, prs_struct *ps, int depth);
void make_reg_q_set_key_sec(REG_Q_SET_KEY_SEC *q_i, POLICY_HND *pol,
- SEC_DESC_BUF *sec_desc_buf);
+ uint32 buf_len, SEC_DESC *sec_desc);
void reg_io_q_set_key_sec(char *desc, REG_Q_SET_KEY_SEC *r_q, prs_struct *ps, int depth);
void reg_io_r_set_key_sec(char *desc, REG_R_SET_KEY_SEC *r_q, prs_struct *ps, int depth);
void make_reg_q_get_key_sec(REG_Q_GET_KEY_SEC *q_i, POLICY_HND *pol,
- uint32 sec_buf_size, SEC_DESC_BUF *psdb);
+ uint32 buf_len, SEC_DESC_BUF *sec_buf);
void reg_io_q_get_key_sec(char *desc, REG_Q_GET_KEY_SEC *r_q, prs_struct *ps, int depth);
void reg_io_r_get_key_sec(char *desc, REG_R_GET_KEY_SEC *r_q, prs_struct *ps, int depth);
void make_reg_q_info(REG_Q_INFO *q_i, POLICY_HND *pol, char *product_type,
@@ -2757,25 +2756,20 @@ void samr_io_r_chgpasswd_user(char *desc, SAMR_R_CHGPASSWD_USER *r_u, prs_struct
/*The following definitions come from rpc_parse/parse_sec.c */
-void init_sec_access(SEC_ACCESS *t, uint32 mask);
-BOOL sec_io_access(char *desc, SEC_ACCESS *t, prs_struct *ps, int depth);
-void init_sec_ace(SEC_ACE *t, DOM_SID *sid, uint8 type, SEC_ACCESS mask,
- uint8 flag);
-BOOL sec_io_ace(char *desc, SEC_ACE *psa, prs_struct *ps, int depth);
-void free_sec_acl(SEC_ACL **ppsa);
-BOOL sec_io_acl(char *desc, SEC_ACL **ppsa, prs_struct *ps, int depth);
-SEC_DESC *make_sec_desc(uint16 revision, uint16 type,
+void make_sec_access(SEC_ACCESS *t, uint32 mask);
+void sec_io_access(char *desc, SEC_ACCESS *t, prs_struct *ps, int depth);
+void make_sec_ace(SEC_ACE *t, DOM_SID *sid, uint8 type, SEC_ACCESS mask, uint8 flag);
+void sec_io_ace(char *desc, SEC_ACE *t, prs_struct *ps, int depth);
+void make_sec_acl(SEC_ACL *t, uint16 revision, int num_aces, SEC_ACE *ace);
+void free_sec_acl(SEC_ACL *t);
+void sec_io_acl(char *desc, SEC_ACL *t, prs_struct *ps, int depth);
+int make_sec_desc(SEC_DESC *t, uint16 revision, uint16 type,
DOM_SID *owner_sid, DOM_SID *grp_sid,
- SEC_ACL *sacl, SEC_ACL *dacl, size_t *sec_desc_size);
-SEC_DESC *dup_sec_desc( SEC_DESC *src);
-void free_sec_desc(SEC_DESC **ppsd);
-SEC_DESC *make_standard_sec_desc(DOM_SID *owner_sid, DOM_SID *grp_sid,
- SEC_ACL *dacl, size_t *sec_desc_size);
-BOOL sec_io_desc(char *desc, SEC_DESC **ppsd, prs_struct *ps, int depth);
-SEC_DESC_BUF *make_sec_desc_buf(int len, SEC_DESC *sec_desc);
-SEC_DESC_BUF *dup_sec_desc_buf(SEC_DESC_BUF *src);
-void free_sec_desc_buf(SEC_DESC_BUF **ppsdb);
-BOOL sec_io_desc_buf(char *desc, SEC_DESC_BUF **ppsdb, prs_struct *ps, int depth);
+ SEC_ACL *sacl, SEC_ACL *dacl);
+void free_sec_desc(SEC_DESC *t);
+void make_sec_desc_buf(SEC_DESC_BUF *buf, int len, SEC_DESC *data);
+void free_sec_desc_buf(SEC_DESC_BUF *buf);
+void sec_io_desc_buf(char *desc, SEC_DESC_BUF *sec, prs_struct *ps, int depth);
/*The following definitions come from rpc_parse/parse_spoolss.c */
diff --git a/source3/include/rpc_secdes.h b/source3/include/rpc_secdes.h
index c2166c9a09..8a86fc9833 100644
--- a/source3/include/rpc_secdes.h
+++ b/source3/include/rpc_secdes.h
@@ -97,7 +97,8 @@ typedef struct security_acl_info
uint16 revision; /* 0x0002 */
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;