summaryrefslogtreecommitdiff
path: root/source3/rpc_parse/parse_samr.c
diff options
context:
space:
mode:
authorLuke Leighton <lkcl@samba.org>1998-12-04 21:48:06 +0000
committerLuke Leighton <lkcl@samba.org>1998-12-04 21:48:06 +0000
commit89c56492a86fb02b2045182490b93f17a475f03d (patch)
treea05232c9a4e77b8ec2148abd0758f86503861429 /source3/rpc_parse/parse_samr.c
parentcf0ea874b1a7cb1dcaaea159d9a4a8a5deae1310 (diff)
downloadsamba-89c56492a86fb02b2045182490b93f17a475f03d.tar.gz
samba-89c56492a86fb02b2045182490b93f17a475f03d.tar.bz2
samba-89c56492a86fb02b2045182490b93f17a475f03d.zip
- oops, i got "add alias member" and "delete alias member" swapped.
- samr_enum_dom_users, the first 4 bytes is some sort of garbage, nt5-beta2 clears them out to zeros whereas nt4 does not. fixed bug where we were assuming that the first 4 bytes of a response _had_ to be non-zero. - cli_lsarpc.c: forgot to append the rid on the lsa_lookup_names() client call. - added in "addaliasmem" and "addgroupmem" commands. the addaliasmem command actually turned out to be a "delaliasmem" :-) :-) - parse_lsa.c: moved assert array check to after the size of useable array space is set... (This used to be commit 165b15a8cacc4bc7cf8cc0b9aaabb6b92cef7fdb)
Diffstat (limited to 'source3/rpc_parse/parse_samr.c')
-rw-r--r--source3/rpc_parse/parse_samr.c42
1 files changed, 20 insertions, 22 deletions
diff --git a/source3/rpc_parse/parse_samr.c b/source3/rpc_parse/parse_samr.c
index a344d0d4ee..ac849a8987 100644
--- a/source3/rpc_parse/parse_samr.c
+++ b/source3/rpc_parse/parse_samr.c
@@ -853,7 +853,7 @@ void samr_io_q_enum_dom_users(char *desc, SAMR_Q_ENUM_DOM_USERS *q_e, prs_struc
makes a SAMR_R_ENUM_DOM_USERS structure.
********************************************************************/
void make_samr_r_enum_dom_users(SAMR_R_ENUM_DOM_USERS *r_u,
- uint16 total_num_entries, uint16 unk_0,
+ uint32 unk_0,
uint32 num_sam_entries, SAM_USER_INFO_21 pass[MAX_SAM_ENTRIES], uint32 status)
{
int i;
@@ -869,10 +869,9 @@ void make_samr_r_enum_dom_users(SAMR_R_ENUM_DOM_USERS *r_u,
num_sam_entries));
}
- r_u->total_num_entries = total_num_entries;
- r_u->unknown_0 = unk_0;
+ r_u->unknown_0 = unk_0;
- if (total_num_entries > 0)
+ if (num_sam_entries != 0)
{
r_u->ptr_entries1 = 1;
r_u->ptr_entries2 = 1;
@@ -917,11 +916,10 @@ void samr_io_r_enum_dom_users(char *desc, SAMR_R_ENUM_DOM_USERS *r_u, prs_struc
prs_align(ps);
- prs_uint16("total_num_entries", ps, depth, &(r_u->total_num_entries));
- prs_uint16("unknown_0 ", ps, depth, &(r_u->unknown_0 ));
+ prs_uint32("unknown_0 ", ps, depth, &(r_u->unknown_0 ));
prs_uint32("ptr_entries1", ps, depth, &(r_u->ptr_entries1));
- if (r_u->total_num_entries != 0 && r_u->ptr_entries1 != 0)
+ if (r_u->ptr_entries1 != 0)
{
prs_uint32("num_entries2", ps, depth, &(r_u->num_entries2));
prs_uint32("ptr_entries2", ps, depth, &(r_u->ptr_entries2));
@@ -2378,7 +2376,7 @@ void make_samr_q_query_useraliases(SAMR_Q_QUERY_USERALIASES *q_u,
memcpy(&(q_u->pol), hnd, sizeof(q_u->pol));
q_u->num_sids1 = 1;
- q_u->ptr = 0;
+ q_u->ptr = 1;
q_u->num_sids2 = 1;
{
@@ -2813,14 +2811,14 @@ void samr_io_r_create_dom_alias(char *desc, SAMR_R_CREATE_DOM_ALIAS *r_u, prs_s
/*******************************************************************
-makes a SAMR_Q_UNK_ALIASMEM structure.
+makes a SAMR_Q_ADD_ALIASMEM structure.
********************************************************************/
-void make_samr_q_unk_aliasmem(SAMR_Q_UNK_ALIASMEM *q_u, POLICY_HND *hnd,
+void make_samr_q_add_aliasmem(SAMR_Q_ADD_ALIASMEM *q_u, POLICY_HND *hnd,
DOM_SID *sid)
{
if (q_u == NULL) return;
- DEBUG(5,("make_samr_q_unk_aliasmem\n"));
+ DEBUG(5,("make_samr_q_add_aliasmem\n"));
memcpy(&(q_u->alias_pol), hnd, sizeof(q_u->alias_pol));
sid_copy(&q_u->sid, sid);
@@ -2830,11 +2828,11 @@ void make_samr_q_unk_aliasmem(SAMR_Q_UNK_ALIASMEM *q_u, POLICY_HND *hnd,
/*******************************************************************
reads or writes a structure.
********************************************************************/
-void samr_io_q_unk_aliasmem(char *desc, SAMR_Q_UNK_ALIASMEM *q_u, prs_struct *ps, int depth)
+void samr_io_q_add_aliasmem(char *desc, SAMR_Q_ADD_ALIASMEM *q_u, prs_struct *ps, int depth)
{
if (q_u == NULL) return;
- prs_debug(ps, depth, desc, "samr_io_q_unk_aliasmem");
+ prs_debug(ps, depth, desc, "samr_io_q_add_aliasmem");
depth++;
prs_align(ps);
@@ -2846,11 +2844,11 @@ void samr_io_q_unk_aliasmem(char *desc, SAMR_Q_UNK_ALIASMEM *q_u, prs_struct *p
/*******************************************************************
reads or writes a structure.
********************************************************************/
-void samr_io_r_unk_aliasmem(char *desc, SAMR_R_UNK_ALIASMEM *r_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)
{
if (r_u == NULL) return;
- prs_debug(ps, depth, desc, "samr_io_r_unk_aliasmem");
+ prs_debug(ps, depth, desc, "samr_io_r_add_aliasmem");
depth++;
prs_align(ps);
@@ -2860,14 +2858,14 @@ void samr_io_r_unk_aliasmem(char *desc, SAMR_R_UNK_ALIASMEM *r_u, prs_struct *p
/*******************************************************************
-makes a SAMR_Q_ADD_ALIASMEM structure.
+makes a SAMR_Q_DEL_ALIASMEM structure.
********************************************************************/
-void make_samr_q_add_aliasmem(SAMR_Q_ADD_ALIASMEM *q_u, POLICY_HND *hnd,
+void make_samr_q_del_aliasmem(SAMR_Q_DEL_ALIASMEM *q_u, POLICY_HND *hnd,
DOM_SID *sid)
{
if (q_u == NULL) return;
- DEBUG(5,("make_samr_q_add_aliasmem\n"));
+ DEBUG(5,("make_samr_q_del_aliasmem\n"));
memcpy(&(q_u->alias_pol), hnd, sizeof(q_u->alias_pol));
make_dom_sid2(&q_u->sid, sid);
@@ -2877,11 +2875,11 @@ void make_samr_q_add_aliasmem(SAMR_Q_ADD_ALIASMEM *q_u, POLICY_HND *hnd,
/*******************************************************************
reads or writes a structure.
********************************************************************/
-void samr_io_q_add_aliasmem(char *desc, SAMR_Q_ADD_ALIASMEM *q_u, prs_struct *ps, int depth)
+void samr_io_q_del_aliasmem(char *desc, SAMR_Q_DEL_ALIASMEM *q_u, prs_struct *ps, int depth)
{
if (q_u == NULL) return;
- prs_debug(ps, depth, desc, "samr_io_q_add_aliasmem");
+ prs_debug(ps, depth, desc, "samr_io_q_del_aliasmem");
depth++;
prs_align(ps);
@@ -2893,11 +2891,11 @@ void samr_io_q_add_aliasmem(char *desc, SAMR_Q_ADD_ALIASMEM *q_u, prs_struct *p
/*******************************************************************
reads or writes a structure.
********************************************************************/
-void samr_io_r_add_aliasmem(char *desc, SAMR_R_ADD_ALIASMEM *r_u, prs_struct *ps, int depth)
+void samr_io_r_del_aliasmem(char *desc, SAMR_R_DEL_ALIASMEM *r_u, prs_struct *ps, int depth)
{
if (r_u == NULL) return;
- prs_debug(ps, depth, desc, "samr_io_r_add_aliasmem");
+ prs_debug(ps, depth, desc, "samr_io_r_del_aliasmem");
depth++;
prs_align(ps);