summaryrefslogtreecommitdiff
path: root/source3/rpc_parse
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2005-01-20 16:51:24 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:55:05 -0500
commit725edd20f1589be310a8d1bab7a0aa907a55416e (patch)
treec18312d0ecc635f6dfee0aba66c9bf244177cbfb /source3/rpc_parse
parente86235fbdcfe8dd71b2ee887052e27f67a240fab (diff)
downloadsamba-725edd20f1589be310a8d1bab7a0aa907a55416e.tar.gz
samba-725edd20f1589be310a8d1bab7a0aa907a55416e.tar.bz2
samba-725edd20f1589be310a8d1bab7a0aa907a55416e.zip
r4868: Add "net rpc user RENAME"-command.
Note that Samba3 does not yet support it server-side. Guenther (This used to be commit b2c8220931733593fd312fc25b6c73f440b4567a)
Diffstat (limited to 'source3/rpc_parse')
-rw-r--r--source3/rpc_parse/parse_samr.c53
1 files changed, 51 insertions, 2 deletions
diff --git a/source3/rpc_parse/parse_samr.c b/source3/rpc_parse/parse_samr.c
index 8d5fee68e0..748ee1fb7c 100644
--- a/source3/rpc_parse/parse_samr.c
+++ b/source3/rpc_parse/parse_samr.c
@@ -5207,6 +5207,44 @@ static BOOL sam_io_user_info12(const char *desc, SAM_USER_INFO_12 * u,
}
/*******************************************************************
+inits a SAM_USER_INFO_7 structure.
+********************************************************************/
+
+void init_sam_user_info7(SAM_USER_INFO_7 * usr, const char *name)
+{
+ DEBUG(5, ("init_sam_user_info7\n"));
+
+ init_unistr2(&usr->uni_name, name, UNI_FLAGS_NONE); /* unicode string for name */
+ init_uni_hdr(&usr->hdr_name, &usr->uni_name); /* unicode header for name */
+
+}
+
+/*******************************************************************
+reads or writes a structure.
+********************************************************************/
+
+static BOOL sam_io_user_info7(const char *desc, SAM_USER_INFO_7 * usr,
+ prs_struct *ps, int depth)
+{
+ if (usr == NULL)
+ return False;
+
+ prs_debug(ps, depth, desc, "samr_io_r_user_info7");
+ depth++;
+
+ if(!prs_align(ps))
+ return False;
+
+ if(!smb_io_unihdr("unihdr", &usr->hdr_name, ps, depth))
+ return False;
+
+ if(!smb_io_unistr2("unistr2", &usr->uni_name, True, ps, depth))
+ return False;
+
+ return True;
+}
+
+/*******************************************************************
inits a SAM_USER_INFO_10 structure.
********************************************************************/
@@ -6277,7 +6315,7 @@ NTSTATUS make_samr_userinfo_ctr_usr21(TALLOC_CTX *ctx, SAM_USERINFO_CTR * ctr,
uint16 switch_value,
SAM_USER_INFO_21 * usr)
{
- DEBUG(5, ("init_samr_userinfo_ctr\n"));
+ DEBUG(5, ("make_samr_userinfo_ctr_usr21\n"));
ctr->switch_value = switch_value;
ctr->info.id = NULL;
@@ -6360,8 +6398,10 @@ static void init_samr_userinfo_ctr(SAM_USERINFO_CTR * ctr, DATA_BLOB *sess_key,
dump_data(100, (char *)sess_key->data, sess_key->length);
dump_data(100, (char *)ctr->info.id23->pass, 516);
break;
+ case 0x07:
+ break;
default:
- DEBUG(4,("init_samr_userinfo_ctr: unsupported switch level\n"));
+ DEBUG(4,("init_samr_userinfo_ctr: unsupported switch level: %d\n", switch_value));
}
}
@@ -6397,6 +6437,15 @@ static BOOL samr_io_userinfo_ctr(const char *desc, SAM_USERINFO_CTR **ppctr,
ret = False;
switch (ctr->switch_value) {
+ case 0x07:
+ if (UNMARSHALLING(ps))
+ ctr->info.id7 = PRS_ALLOC_MEM(ps,SAM_USER_INFO_7,1);
+ if (ctr->info.id7 == NULL) {
+ DEBUG(2,("samr_io_userinfo_ctr: info pointer not initialised\n"));
+ return False;
+ }
+ ret = sam_io_user_info7("", ctr->info.id7, ps, depth);
+ break;
case 0x10:
if (UNMARSHALLING(ps))
ctr->info.id10 = PRS_ALLOC_MEM(ps,SAM_USER_INFO_10,1);