summaryrefslogtreecommitdiff
path: root/source4/libnet/libnet_domain.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2007-08-02 13:08:39 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 15:01:27 -0500
commite0779e2d3bb29c16fc4215e78cda8764bce15767 (patch)
tree3fed4eddc9dc2130ba141328113b903e595f7558 /source4/libnet/libnet_domain.c
parentfc9471c4df4cbdda8917a6c06640214bfd956602 (diff)
downloadsamba-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/libnet/libnet_domain.c')
-rw-r--r--source4/libnet/libnet_domain.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source4/libnet/libnet_domain.c b/source4/libnet/libnet_domain.c
index 500d5f817d..3de281d625 100644
--- a/source4/libnet/libnet_domain.c
+++ b/source4/libnet/libnet_domain.c
@@ -361,6 +361,7 @@ NTSTATUS libnet_DomainOpenSamr_recv(struct composite_context *c, struct libnet_c
libnet functions */
ctx->samr.connect_handle = s->connect_handle;
ctx->samr.handle = s->domain_handle;
+ ctx->samr.sid = talloc_steal(ctx, s->lookup.out.sid);
ctx->samr.name = talloc_steal(ctx, s->domain_name.string);
ctx->samr.access_mask = s->access_mask;
}
@@ -844,7 +845,10 @@ NTSTATUS libnet_DomainCloseSamr_recv(struct composite_context *c, struct libnet_
/* domain policy handle closed successfully */
ZERO_STRUCT(ctx->samr.handle);
+ talloc_free(ctx->samr.name);
+ talloc_free(ctx->samr.sid);
ctx->samr.name = NULL;
+ ctx->samr.sid = NULL;
io->out.error_string = talloc_asprintf(mem_ctx, "Success");