summaryrefslogtreecommitdiff
path: root/source3/rpc_server
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/rpc_server
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/rpc_server')
-rw-r--r--source3/rpc_server/srv_samr.c19
1 files changed, 12 insertions, 7 deletions
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, "<account description>");
}
}
- make_samr_r_query_aliasinfo(&r_e, q_u->switch_level,
- "<account description>",
- 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);