summaryrefslogtreecommitdiff
path: root/source3/include
diff options
context:
space:
mode:
authorLuke Leighton <lkcl@samba.org>1998-12-01 16:04:24 +0000
committerLuke Leighton <lkcl@samba.org>1998-12-01 16:04:24 +0000
commit67638b8d2b59dc992280af934346a5a1ef5fe62d (patch)
tree5e155440b7d3743385506526532d5a634d8c9f53 /source3/include
parentc6ad04b8fb4ee5cbf862a35b4c143a6f75555718 (diff)
downloadsamba-67638b8d2b59dc992280af934346a5a1ef5fe62d.tar.gz
samba-67638b8d2b59dc992280af934346a5a1ef5fe62d.tar.bz2
samba-67638b8d2b59dc992280af934346a5a1ef5fe62d.zip
adding some samr parsing calls (group / alias adding / deleting)
added code that moves MACHINE.SID to DOMAIN_NAME.SID if it exists. (This used to be commit 51c1c31768a92d9c57ee6c09b78419bcbc544f03)
Diffstat (limited to 'source3/include')
-rw-r--r--source3/include/proto.h81
-rw-r--r--source3/include/rpc_samr.h52
2 files changed, 71 insertions, 62 deletions
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 2e7433bb43..5de9e9657a 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -1411,7 +1411,7 @@ BOOL initialise_sam_password_db(void);
void *startsam21pwent(BOOL update);
void endsam21pwent(void *vp);
struct sam_passwd *getsam21pwent(void *vp);
-struct sam_passwd *iterate_getsam21pwntnam(const char *name);
+struct sam_passwd *iterate_getsam21pwntnam(const char *ntname);
struct sam_passwd *iterate_getsam21pwrid(uint32 rid);
struct sam_passwd *iterate_getsam21pwuid(uid_t uid);
struct sam_disp_info *getsamdisprid(uint32 rid);
@@ -2028,12 +2028,6 @@ void make_samr_r_enum_dom_users(SAMR_R_ENUM_DOM_USERS *r_u,
uint16 total_num_entries, uint16 unk_0,
uint32 num_sam_entries, SAM_USER_INFO_21 pass[MAX_SAM_ENTRIES], uint32 status);
void samr_io_r_enum_dom_users(char *desc, SAMR_R_ENUM_DOM_USERS *r_u, prs_struct *ps, int depth);
-void make_samr_q_enum_dom_aliases(SAMR_Q_ENUM_DOM_ALIASES *q_e, POLICY_HND *pol, uint32 size);
-void samr_io_q_enum_dom_aliases(char *desc, SAMR_Q_ENUM_DOM_ALIASES *q_e, prs_struct *ps, int depth);
-void make_samr_r_enum_dom_aliases(SAMR_R_ENUM_DOM_ALIASES *r_u,
- uint32 num_sam_entries, LOCAL_GRP *alss,
- uint32 status);
-void samr_io_r_enum_dom_aliases(char *desc, SAMR_R_ENUM_DOM_ALIASES *r_u, prs_struct *ps, int depth);
void make_samr_q_query_dispinfo(SAMR_Q_QUERY_DISPINFO *q_e, POLICY_HND *pol,
uint16 switch_level, uint32 start_idx, uint32 size);
void samr_io_q_query_dispinfo(char *desc, SAMR_Q_QUERY_DISPINFO *q_e, prs_struct *ps, int depth);
@@ -2046,6 +2040,8 @@ void make_sam_info_1(SAM_INFO_1 *sam, uint32 acb_mask,
void make_samr_r_query_dispinfo(SAMR_R_QUERY_DISPINFO *r_u,
uint16 switch_level, SAM_INFO_CTR *ctr, uint32 status);
void samr_io_r_query_dispinfo(char *desc, SAMR_R_QUERY_DISPINFO *r_u, prs_struct *ps, int depth);
+void make_samr_q_open_group(SAMR_Q_OPEN_GROUP *q_c,
+ POLICY_HND *hnd, uint32 unk, uint32 rid);
void make_samr_q_enum_dom_groups(SAMR_Q_ENUM_DOM_GROUPS *q_e, POLICY_HND *pol,
uint16 switch_level, uint32 start_idx, uint32 size);
void samr_io_q_enum_dom_groups(char *desc, SAMR_Q_ENUM_DOM_GROUPS *q_e, prs_struct *ps, int depth);
@@ -2054,14 +2050,32 @@ void make_samr_r_enum_dom_groups(SAMR_R_ENUM_DOM_GROUPS *r_u,
DOMAIN_GRP *grp,
uint32 status);
void samr_io_r_enum_dom_groups(char *desc, SAMR_R_ENUM_DOM_GROUPS *r_u, prs_struct *ps, int depth);
+void make_samr_q_query_usergroups(SAMR_Q_QUERY_USERGROUPS *q_u,
+ POLICY_HND *hnd);
+void samr_io_q_query_usergroups(char *desc, SAMR_Q_QUERY_USERGROUPS *q_u, prs_struct *ps, int depth);
+void make_samr_r_query_usergroups(SAMR_R_QUERY_USERGROUPS *r_u,
+ uint32 num_gids, DOM_GID *gid, uint32 status);
+void samr_io_r_query_usergroups(char *desc, SAMR_R_QUERY_USERGROUPS *r_u, prs_struct *ps, int depth);
+void make_samr_q_enum_dom_aliases(SAMR_Q_ENUM_DOM_ALIASES *q_e, POLICY_HND *pol, uint32 size);
+void samr_io_q_enum_dom_aliases(char *desc, SAMR_Q_ENUM_DOM_ALIASES *q_e, prs_struct *ps, int depth);
+void make_samr_r_enum_dom_aliases(SAMR_R_ENUM_DOM_ALIASES *r_u,
+ uint32 num_sam_entries, LOCAL_GRP *alss,
+ uint32 status);
+void samr_io_r_enum_dom_aliases(char *desc, SAMR_R_ENUM_DOM_ALIASES *r_u, prs_struct *ps, int depth);
+void make_samr_alias_info3(ALIAS_INFO3 *al3, char *acct_desc);
+void samr_io_alias_info3(char *desc, ALIAS_INFO3 *al3, prs_struct *ps, int depth);
+void samr_alias_info_ctr(char *desc, ALIAS_INFO_CTR *ctr, prs_struct *ps, int depth);
void make_samr_q_query_aliasinfo(SAMR_Q_QUERY_ALIASINFO *q_e,
POLICY_HND *pol,
uint16 switch_level);
void samr_io_q_query_aliasinfo(char *desc, SAMR_Q_QUERY_ALIASINFO *q_e, prs_struct *ps, int depth);
-void make_samr_r_query_aliasinfo(SAMR_R_QUERY_ALIASINFO *r_u,
- uint16 switch_value, char *acct_desc,
+void make_samr_r_query_aliasinfo(SAMR_R_QUERY_ALIASINFO *r_u, ALIAS_INFO_CTR *ctr,
uint32 status);
void samr_io_r_query_aliasinfo(char *desc, SAMR_R_QUERY_ALIASINFO *r_u, prs_struct *ps, int depth);
+void make_samr_q_set_aliasinfo(SAMR_Q_SET_ALIASINFO *q_u, POLICY_HND *hnd,
+ ALIAS_INFO_CTR *ctr);
+void samr_io_q_set_aliasinfo(char *desc, SAMR_Q_SET_ALIASINFO *q_u, prs_struct *ps, int depth);
+void samr_io_r_set_aliasinfo(char *desc, SAMR_R_SET_ALIASINFO *r_u, prs_struct *ps, int depth);
void make_samr_q_query_useraliases(SAMR_Q_QUERY_USERALIASES *q_u,
POLICY_HND *hnd,
DOM_SID *sid);
@@ -2069,26 +2083,44 @@ void samr_io_q_query_useraliases(char *desc, SAMR_Q_QUERY_USERALIASES *q_u, prs
void make_samr_r_query_useraliases(SAMR_R_QUERY_USERALIASES *r_u,
uint32 num_rids, uint32 *rid, uint32 status);
void samr_io_r_query_useraliases(char *desc, SAMR_R_QUERY_USERALIASES *r_u, prs_struct *ps, int depth);
-void samr_io_q_lookup_names(char *desc, SAMR_Q_LOOKUP_NAMES *q_u, prs_struct *ps, int depth);
-void make_samr_r_lookup_names(SAMR_R_LOOKUP_NAMES *r_u,
- uint32 num_rids, uint32 *rid, uint8 *type, uint32 status);
-void samr_io_r_lookup_names(char *desc, SAMR_R_LOOKUP_NAMES *r_u, prs_struct *ps, int depth);
+void make_samr_q_open_alias(SAMR_Q_OPEN_ALIAS *q_u,
+ uint32 unknown_0, uint32 rid);
+void samr_io_q_open_alias(char *desc, SAMR_Q_OPEN_ALIAS *q_u, prs_struct *ps, int depth);
+void samr_io_r_open_alias(char *desc, SAMR_R_OPEN_ALIAS *r_u, prs_struct *ps, int depth);
+void make_samr_q_unknown_12(SAMR_Q_UNKNOWN_12 *q_u,
+ POLICY_HND *pol, uint32 rid,
+ uint32 num_gids, uint32 *gid);
void samr_io_q_unknown_12(char *desc, SAMR_Q_UNKNOWN_12 *q_u, prs_struct *ps, int depth);
void make_samr_r_unknown_12(SAMR_R_UNKNOWN_12 *r_u,
uint32 num_aliases, fstring *als_name, uint8 *num_als_usrs,
uint32 status);
void samr_io_r_unknown_12(char *desc, SAMR_R_UNKNOWN_12 *r_u, prs_struct *ps, int depth);
+void make_samr_q_delete_alias(SAMR_Q_DELETE_DOM_ALIAS *q_u, POLICY_HND *hnd);
+void samr_io_q_delete_alias(char *desc, SAMR_Q_DELETE_DOM_ALIAS *q_u, prs_struct *ps, int depth);
+void samr_io_r_delete_alias(char *desc, SAMR_R_DELETE_DOM_ALIAS *r_u, prs_struct *ps, int depth);
+void make_samr_q_create_dom_alias(SAMR_Q_CREATE_DOM_ALIAS *q_u, POLICY_HND *hnd,
+ char *acct_desc);
+void samr_io_q_create_dom_alias(char *desc, SAMR_Q_CREATE_DOM_ALIAS *q_u, prs_struct *ps, int depth);
+void samr_io_r_create_dom_alias(char *desc, SAMR_R_CREATE_DOM_ALIAS *r_u, prs_struct *ps, int depth);
+void make_samr_q_unk_aliasmem(SAMR_Q_UNK_ALIASMEM *q_u, POLICY_HND *hnd,
+ DOM_SID *sid);
+void samr_io_q_unk_aliasmem(char *desc, SAMR_Q_UNK_ALIASMEM *q_u, prs_struct *ps, int depth);
+void samr_io_r_unk_aliasmem(char *desc, SAMR_R_UNK_ALIASMEM *r_u, prs_struct *ps, int depth);
+void make_samr_q_add_aliasmem(SAMR_Q_ADD_ALIASMEM *q_u, POLICY_HND *hnd,
+ DOM_SID *sid);
+void samr_io_q_add_aliasmem(char *desc, SAMR_Q_ADD_ALIASMEM *q_u, prs_struct *ps, int depth);
+void samr_io_r_add_aliasmem(char *desc, SAMR_R_ADD_ALIASMEM *r_u, prs_struct *ps, int depth);
+void make_samr_q_unknown_21(SAMR_Q_UNKNOWN_21 *q_c,
+ POLICY_HND *hnd, uint16 unk_1, uint16 unk_2);
+void samr_io_q_lookup_names(char *desc, SAMR_Q_LOOKUP_NAMES *q_u, prs_struct *ps, int depth);
+void make_samr_r_lookup_names(SAMR_R_LOOKUP_NAMES *r_u,
+ uint32 num_rids, uint32 *rid, uint8 *type, uint32 status);
+void samr_io_r_lookup_names(char *desc, SAMR_R_LOOKUP_NAMES *r_u, prs_struct *ps, int depth);
void make_samr_q_open_user(SAMR_Q_OPEN_USER *q_u,
POLICY_HND *pol,
uint32 unk_0, uint32 rid);
void samr_io_q_open_user(char *desc, SAMR_Q_OPEN_USER *q_u, prs_struct *ps, int depth);
void samr_io_r_open_user(char *desc, SAMR_R_OPEN_USER *r_u, prs_struct *ps, int depth);
-void make_samr_q_query_usergroups(SAMR_Q_QUERY_USERGROUPS *q_u,
- POLICY_HND *hnd);
-void samr_io_q_query_usergroups(char *desc, SAMR_Q_QUERY_USERGROUPS *q_u, prs_struct *ps, int depth);
-void make_samr_r_query_usergroups(SAMR_R_QUERY_USERGROUPS *r_u,
- uint32 num_gids, DOM_GID *gid, uint32 status);
-void samr_io_r_query_usergroups(char *desc, SAMR_R_QUERY_USERGROUPS *r_u, prs_struct *ps, int depth);
void make_samr_q_query_userinfo(SAMR_Q_QUERY_USERINFO *q_u,
POLICY_HND *hnd, uint16 switch_value);
void samr_io_q_query_userinfo(char *desc, SAMR_Q_QUERY_USERINFO *q_u, prs_struct *ps, int depth);
@@ -2143,17 +2175,6 @@ void samr_io_r_connect(char *desc, SAMR_R_CONNECT *r_u, prs_struct *ps, int dep
void make_samr_q_connect_anon(SAMR_Q_CONNECT_ANON *q_u);
void samr_io_q_connect_anon(char *desc, SAMR_Q_CONNECT_ANON *q_u, prs_struct *ps, int depth);
void samr_io_r_connect_anon(char *desc, SAMR_R_CONNECT_ANON *r_u, prs_struct *ps, int depth);
-void make_samr_q_open_alias(SAMR_Q_OPEN_ALIAS *q_u,
- uint32 unknown_0, uint32 rid);
-void samr_io_q_open_alias(char *desc, SAMR_Q_OPEN_ALIAS *q_u, prs_struct *ps, int depth);
-void samr_io_r_open_alias(char *desc, SAMR_R_OPEN_ALIAS *r_u, prs_struct *ps, int depth);
-void make_samr_q_unknown_12(SAMR_Q_UNKNOWN_12 *q_u,
- POLICY_HND *pol, uint32 rid,
- uint32 num_gids, uint32 *gid);
-void make_samr_q_unknown_21(SAMR_Q_UNKNOWN_21 *q_c,
- POLICY_HND *hnd, uint16 unk_1, uint16 unk_2);
-void make_samr_q_unknown_13(SAMR_Q_UNKNOWN_13 *q_c,
- POLICY_HND *hnd, uint16 unk_1, uint16 unk_2);
void make_samr_q_unknown_38(SAMR_Q_UNKNOWN_38 *q_u, char *srv_name);
void samr_io_q_unknown_38(char *desc, SAMR_Q_UNKNOWN_38 *q_u, prs_struct *ps, int depth);
void make_samr_r_unknown_38(SAMR_R_UNKNOWN_38 *r_u);
diff --git a/source3/include/rpc_samr.h b/source3/include/rpc_samr.h
index 83be3b83f0..6a1dc8d860 100644
--- a/source3/include/rpc_samr.h
+++ b/source3/include/rpc_samr.h
@@ -108,7 +108,6 @@ SamrTestPrivateFunctionsUser
#define SAMR_ADD_ALIASMEM 0x20
#define SAMR_QUERY_ALIASMEM 0x21
-#define SAMR_UNKNOWN_21 0x21
#define SAMR_OPEN_USER 0x22
#define SAMR_QUERY_USERINFO 0x24
@@ -794,7 +793,7 @@ typedef struct r_samr_set_group_info
/* SAMR_Q_DELETE_DOM_ALIAS - delete domain alias */
typedef struct q_samr_delete_dom_alias_info
{
- POLICY_HND pol; /* policy handle */
+ POLICY_HND alias_pol; /* policy handle */
} SAMR_Q_DELETE_DOM_ALIAS;
@@ -811,7 +810,7 @@ typedef struct r_samr_delete_dom_alias_info
/* SAMR_Q_CREATE_DOM_ALIAS - SAM create alias */
typedef struct q_samr_create_dom_alias_info
{
- POLICY_HND pol; /* policy handle */
+ POLICY_HND dom_pol; /* policy handle */
UNIHDR hdr_acct_desc;
UNISTR2 uni_acct_desc;
@@ -824,7 +823,7 @@ typedef struct q_samr_create_dom_alias_info
/* SAMR_R_CREATE_DOM_ALIAS - SAM create alias */
typedef struct r_samr_create_dom_alias_info
{
- POLICY_HND pol; /* policy handle */
+ POLICY_HND alias_pol; /* policy handle */
uint32 rid;
uint32 status;
@@ -847,12 +846,10 @@ typedef struct samr_alias_info3
} ALIAS_INFO3;
-/* SAMR_R_QUERY_ALIASINFO - SAM alias info */
-typedef struct r_samr_query_aliasinfo_info
+/* ALIAS_INFO_CTR */
+typedef struct alias_info_ctr
{
- uint32 ptr;
- uint16 switch_value; /* 0x0003 */
- /* uint8[2] padding */
+ uint16 switch_value;
union
{
@@ -860,6 +857,14 @@ typedef struct r_samr_query_aliasinfo_info
} alias;
+} ALIAS_INFO_CTR;
+
+/* SAMR_R_QUERY_ALIASINFO - SAM alias info */
+typedef struct r_samr_query_aliasinfo_info
+{
+ uint32 ptr;
+ ALIAS_INFO_CTR *ctr;
+
uint32 status;
} SAMR_R_QUERY_ALIASINFO;
@@ -868,16 +873,8 @@ typedef struct r_samr_query_aliasinfo_info
/* SAMR_Q_SET_ALIASINFO - SAM Alias Info */
typedef struct q_samr_set_alias_info
{
- POLICY_HND pol; /* policy handle */
-
- uint16 switch_value1; /* 0x0003 */
- uint16 switch_value2; /* 0x0003 */
-
- union
- {
- ALIAS_INFO3 info3;
-
- } alias;
+ POLICY_HND alias_pol; /* policy handle */
+ ALIAS_INFO_CTR *ctr;
} SAMR_Q_SET_ALIASINFO;
@@ -1081,16 +1078,6 @@ typedef struct r_samr_open_user_info
} SAMR_R_OPEN_USER;
-/* SAMR_Q_UNKNOWN_13 - probably an open alias in domain */
-typedef struct q_samr_unknown_13_info
-{
- POLICY_HND alias_pol; /* policy handle */
-
- uint16 unknown_1; /* 16 bit unknown - 0x0200 */
- uint16 unknown_2; /* 16 bit unknown - 0x0000 */
-
-} SAMR_Q_UNKNOWN_13;
-
/* SAMR_Q_UNKNOWN_32 - probably a "create SAM entry" */
typedef struct q_samr_unknown_32_info
@@ -1142,7 +1129,8 @@ typedef struct r_samr_add_group_mem_info
/* SAMR_Q_OPEN_GROUP - probably an open */
typedef struct q_samr_open_group_info
{
- uint32 unknown_0; /* 0x0000 0001, 0x0000 0003, 0x0000 001f */
+ POLICY_HND domain_pol; /* policy handle */
+ uint32 unknown; /* 0x0000 0001, 0x0000 0003, 0x0000 001f */
uint32 rid_group; /* rid */
} SAMR_Q_OPEN_GROUP;
@@ -1171,7 +1159,7 @@ typedef struct q_samr_unknown_21_info
/* SAMR_Q_UNK_ALIASMEM - don't know! */
typedef struct q_samr_unk_alias_mem_info
{
- POLICY_HND pol; /* policy handle */
+ POLICY_HND alias_pol; /* policy handle */
DOM_SID sid; /* member sid to be "something"ed to do with the alias */
@@ -1189,7 +1177,7 @@ typedef struct r_samr_unk_alias_mem_info
/* SAMR_Q_ADD_ALIASMEM - probably an add member */
typedef struct q_samr_add_alias_mem_info
{
- POLICY_HND pol; /* policy handle */
+ POLICY_HND alias_pol; /* policy handle */
DOM_SID sid; /* member sid to be added to alias */