summaryrefslogtreecommitdiff
path: root/source3/rpc_parse
diff options
context:
space:
mode:
authorLuke Leighton <lkcl@samba.org>1999-11-04 00:09:15 +0000
committerLuke Leighton <lkcl@samba.org>1999-11-04 00:09:15 +0000
commitcae821d45926157a250e9fa047e0c8aa8c0c2c54 (patch)
treee495f7062f29938d87a3bfe7aa9aad42cd462e07 /source3/rpc_parse
parent83f2465f0f1432bc0aba76b83f3a781fb7c3a071 (diff)
downloadsamba-cae821d45926157a250e9fa047e0c8aa8c0c2c54.tar.gz
samba-cae821d45926157a250e9fa047e0c8aa8c0c2c54.tar.bz2
samba-cae821d45926157a250e9fa047e0c8aa8c0c2c54.zip
adding experimental set user password command to rpcclient, it returns
error wrong password against nt. ???? (This used to be commit b3f16e6b5aa5ba1b6afa38ad698646c8e765ec90)
Diffstat (limited to 'source3/rpc_parse')
-rw-r--r--source3/rpc_parse/parse_samr.c45
1 files changed, 31 insertions, 14 deletions
diff --git a/source3/rpc_parse/parse_samr.c b/source3/rpc_parse/parse_samr.c
index c41d7014bd..de87c42473 100644
--- a/source3/rpc_parse/parse_samr.c
+++ b/source3/rpc_parse/parse_samr.c
@@ -5341,27 +5341,19 @@ BOOL make_samr_q_set_userinfo(SAMR_Q_SET_USERINFO *q_u,
memcpy(&(q_u->pol), hnd, sizeof(q_u->pol));
q_u->switch_value = switch_value;
q_u->switch_value2 = switch_value;
+ q_u->info.id = info;
switch (switch_value)
{
case 0x18:
- {
- q_u->info.id24 = (SAM_USER_INFO_24*)info;
-
- break;
- }
-
case 0x17:
{
- q_u->info.id23 = (SAM_USER_INFO_23*)info;
-
break;
}
-
default:
{
DEBUG(4,("make_samr_q_set_userinfo: unsupported switch level\n"));
- break;
+ return False;
}
}
@@ -5397,8 +5389,12 @@ BOOL samr_io_q_set_userinfo(char *desc, SAMR_Q_SET_USERINFO *q_u, prs_struct *ps
}
case 24:
{
- q_u->info.id = (SAM_USER_INFO_24*)Realloc(NULL,
- sizeof(*q_u->info.id24));
+ if (ps->io)
+ {
+ /* reading */
+ q_u->info.id = (SAM_USER_INFO_24*)Realloc(NULL,
+ sizeof(*q_u->info.id24));
+ }
if (q_u->info.id == NULL)
{
DEBUG(2,("samr_io_q_query_userinfo: info pointer not initialised\n"));
@@ -5409,8 +5405,12 @@ BOOL samr_io_q_set_userinfo(char *desc, SAMR_Q_SET_USERINFO *q_u, prs_struct *ps
}
case 23:
{
- q_u->info.id = (SAM_USER_INFO_23*)Realloc(NULL,
- sizeof(*q_u->info.id23));
+ if (ps->io)
+ {
+ /* reading */
+ q_u->info.id = (SAM_USER_INFO_23*)Realloc(NULL,
+ sizeof(*q_u->info.id23));
+ }
if (q_u->info.id == NULL)
{
DEBUG(2,("samr_io_q_query_userinfo: info pointer not initialised\n"));
@@ -5428,10 +5428,27 @@ BOOL samr_io_q_set_userinfo(char *desc, SAMR_Q_SET_USERINFO *q_u, prs_struct *ps
}
prs_align(ps);
+ if (!ps->io)
+ {
+ free_samr_q_set_userinfo(q_u);
+ }
+
return True;
}
/*******************************************************************
+frees a structure.
+********************************************************************/
+void free_samr_q_set_userinfo(SAMR_Q_SET_USERINFO *q_u)
+{
+ if (q_u->info.id == NULL)
+ {
+ free(q_u->info.id);
+ }
+ q_u->info.id = NULL;
+}
+
+/*******************************************************************
makes a SAMR_R_SET_USERINFO structure.
********************************************************************/
BOOL make_samr_r_set_userinfo(SAMR_R_SET_USERINFO *r_u, uint32 status)