summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2008-10-28 00:03:28 +0100
committerGünther Deschner <gd@samba.org>2008-11-10 21:46:27 +0100
commit94b7db1fb49e1811af002163f9818706e1ea7f7a (patch)
treef9a940ab7a920f7b53840eb56c21133febc3bb4b
parent5ce30d0f4db94e61ae469155b863b124587495a4 (diff)
downloadsamba-94b7db1fb49e1811af002163f9818706e1ea7f7a.tar.gz
samba-94b7db1fb49e1811af002163f9818706e1ea7f7a.tar.bz2
samba-94b7db1fb49e1811af002163f9818706e1ea7f7a.zip
s4-samr: merge samr_RidToSid from s3 idl. (fixme: python)
Guenther
-rw-r--r--librpc/idl/samr.idl3
-rw-r--r--source3/librpc/idl/samr.idl2
-rw-r--r--source4/rpc_server/samr/dcesrv_samr.c4
-rw-r--r--source4/torture/rpc/samr.c7
4 files changed, 8 insertions, 8 deletions
diff --git a/librpc/idl/samr.idl b/librpc/idl/samr.idl
index 7b7d1f9092..b0dacc91d4 100644
--- a/librpc/idl/samr.idl
+++ b/librpc/idl/samr.idl
@@ -1428,10 +1428,9 @@ import "misc.idl", "lsa.idl", "security.idl";
NTSTATUS samr_RidToSid(
[in,ref] policy_handle *domain_handle,
[in] uint32 rid,
- [out,unique] dom_sid2 *sid
+ [out,ref] dom_sid2 **sid
);
-
/************************/
/* Function 0x42 */
diff --git a/source3/librpc/idl/samr.idl b/source3/librpc/idl/samr.idl
index 2f8657a0b1..8fbc132aa7 100644
--- a/source3/librpc/idl/samr.idl
+++ b/source3/librpc/idl/samr.idl
@@ -1431,7 +1431,7 @@ import "misc.idl", "lsa.idl", "security.idl";
NTSTATUS samr_RidToSid(
[in,ref] policy_handle *domain_handle,
[in] uint32 rid,
- [out,ref] dom_sid2 *sid
+ [out,ref] dom_sid2 **sid
);
/************************/
diff --git a/source4/rpc_server/samr/dcesrv_samr.c b/source4/rpc_server/samr/dcesrv_samr.c
index e8d800e23d..37446f5aa2 100644
--- a/source4/rpc_server/samr/dcesrv_samr.c
+++ b/source4/rpc_server/samr/dcesrv_samr.c
@@ -4307,8 +4307,8 @@ static NTSTATUS dcesrv_samr_RidToSid(struct dcesrv_call_state *dce_call, TALLOC_
d_state = h->data;
/* form the users SID */
- r->out.sid = dom_sid_add_rid(mem_ctx, d_state->domain_sid, r->in.rid);
- if (!r->out.sid) {
+ *r->out.sid = dom_sid_add_rid(mem_ctx, d_state->domain_sid, r->in.rid);
+ if (!*r->out.sid) {
return NT_STATUS_NO_MEMORY;
}
diff --git a/source4/torture/rpc/samr.c b/source4/torture/rpc/samr.c
index 9ea92037d0..8e527d990b 100644
--- a/source4/torture/rpc/samr.c
+++ b/source4/torture/rpc/samr.c
@@ -4146,7 +4146,7 @@ static bool test_RidToSid(struct dcerpc_pipe *p, struct torture_context *tctx,
struct samr_RidToSid r;
NTSTATUS status;
bool ret = true;
- struct dom_sid *calc_sid;
+ struct dom_sid *calc_sid, *out_sid;
int rids[] = { 0, 42, 512, 10200 };
int i;
@@ -4156,6 +4156,7 @@ static bool test_RidToSid(struct dcerpc_pipe *p, struct torture_context *tctx,
calc_sid = dom_sid_dup(tctx, domain_sid);
r.in.domain_handle = domain_handle;
r.in.rid = rids[i];
+ r.out.sid = &out_sid;
status = dcerpc_samr_RidToSid(p, tctx, &r);
if (!NT_STATUS_IS_OK(status)) {
@@ -4164,9 +4165,9 @@ static bool test_RidToSid(struct dcerpc_pipe *p, struct torture_context *tctx,
} else {
calc_sid = dom_sid_add_rid(calc_sid, calc_sid, rids[i]);
- if (!dom_sid_equal(calc_sid, r.out.sid)) {
+ if (!dom_sid_equal(calc_sid, out_sid)) {
printf("RidToSid for %d failed - got %s, expected %s\n", rids[i],
- dom_sid_string(tctx, r.out.sid),
+ dom_sid_string(tctx, out_sid),
dom_sid_string(tctx, calc_sid));
ret = false;
}