From 67638b8d2b59dc992280af934346a5a1ef5fe62d Mon Sep 17 00:00:00 2001 From: Luke Leighton Date: Tue, 1 Dec 1998 16:04:24 +0000 Subject: 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) --- source3/rpc_server/srv_samr.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) (limited to 'source3/rpc_server') diff --git a/source3/rpc_server/srv_samr.c b/source3/rpc_server/srv_samr.c index d0f139645c..45095a9c3b 100644 --- a/source3/rpc_server/srv_samr.c +++ b/source3/rpc_server/srv_samr.c @@ -678,8 +678,9 @@ static void samr_reply_query_aliasinfo(SAMR_Q_QUERY_ALIASINFO *q_u, prs_struct *rdata) { SAMR_R_QUERY_ALIASINFO r_e; + ALIAS_INFO_CTR ctr; + uint32 status = 0x0; - r_e.status = 0x0; r_e.ptr = 0; /* find the policy handle. open a policy on it. */ @@ -690,17 +691,21 @@ static void samr_reply_query_aliasinfo(SAMR_Q_QUERY_ALIASINFO *q_u, DEBUG(5,("samr_reply_query_aliasinfo: %d\n", __LINE__)); - if (r_e.status == 0x0) + if (status == 0x0) { - if (q_u->switch_level != 3) + if (q_u->switch_level == 3) + { + status = NT_STATUS_INVALID_INFO_CLASS; + } + else { - r_e.status = NT_STATUS_INVALID_INFO_CLASS; + r_e.ptr = 1; + ctr.switch_value = 3; + make_samr_alias_info3(&ctr.alias.info3, ""); } } - make_samr_r_query_aliasinfo(&r_e, q_u->switch_level, - "", - r_e.status); + make_samr_r_query_aliasinfo(&r_e, status == 0 ? &ctr : NULL, status); /* store the response in the SMB stream */ samr_io_r_query_aliasinfo("", &r_e, rdata, 0); -- cgit