diff options
author | Andrew Bartlett <abartlet@samba.org> | 2007-08-02 13:08:39 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 15:01:27 -0500 |
commit | e0779e2d3bb29c16fc4215e78cda8764bce15767 (patch) | |
tree | 3fed4eddc9dc2130ba141328113b903e595f7558 /source4/torture/libnet | |
parent | fc9471c4df4cbdda8917a6c06640214bfd956602 (diff) | |
download | samba-e0779e2d3bb29c16fc4215e78cda8764bce15767.tar.gz samba-e0779e2d3bb29c16fc4215e78cda8764bce15767.tar.bz2 samba-e0779e2d3bb29c16fc4215e78cda8764bce15767.zip |
r24127: Set the Domain SID into the libnet context, and have libnet_UserInfo
return full SIDs for the user SID and primary group sid.
This should help kai with his getpwnam work in winbind.
Andrew Bartlett
(This used to be commit 078671d5015c63e4bcd96815e150dae918763b83)
Diffstat (limited to 'source4/torture/libnet')
-rw-r--r-- | source4/torture/libnet/libnet_domain.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/source4/torture/libnet/libnet_domain.c b/source4/torture/libnet/libnet_domain.c index c337514aa6..7023988f9b 100644 --- a/source4/torture/libnet/libnet_domain.c +++ b/source4/torture/libnet/libnet_domain.c @@ -34,7 +34,7 @@ static BOOL test_opendomain_samr(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, struct policy_handle *handle, struct lsa_String *domname, - uint32_t *access_mask) + uint32_t *access_mask, struct dom_sid **sid) { NTSTATUS status; struct policy_handle h, domain_handle; @@ -69,7 +69,7 @@ static BOOL test_opendomain_samr(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, r3.in.connect_handle = &h; r3.in.access_mask = *access_mask; - r3.in.sid = r2.out.sid; + r3.in.sid = *sid = r2.out.sid; r3.out.domain_handle = &domain_handle; printf("opening domain\n"); @@ -320,6 +320,7 @@ BOOL torture_domain_close_samr(struct torture_context *torture) struct policy_handle h; struct dcerpc_pipe *p; struct libnet_DomainClose r; + struct dom_sid *sid; bindstr = torture_setting_string(torture, "binding", NULL); status = dcerpc_parse_binding(torture, bindstr, &binding); @@ -347,18 +348,19 @@ BOOL torture_domain_close_samr(struct torture_context *torture) goto done; } - domain_name.string = lp_workgroup(); + domain_name.string = talloc_strdup(mem_ctx, lp_workgroup()); - if (!test_opendomain_samr(p, torture, &h, &domain_name, &access_mask)) { + if (!test_opendomain_samr(p, torture, &h, &domain_name, &access_mask, &sid)) { d_printf("failed to open domain on samr service\n"); ret = False; goto done; } ctx->samr.pipe = p; - ctx->samr.name = domain_name.string; + ctx->samr.name = talloc_steal(ctx, domain_name.string); ctx->samr.access_mask = access_mask; ctx->samr.handle = h; + ctx->samr.sid = talloc_steal(ctx, sid); /* we have to use pipe's event context, otherwise the call will hang indefinitely - this wouldn't be the case if pipe was opened by means of libnet call */ |