summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2009-12-15 14:01:43 +0100
committerVolker Lendecke <vl@samba.org>2009-12-15 20:28:47 +0100
commit20bcdf85f16216c45ded886217fedc4516cc591c (patch)
treed005f8eb1c65c13fa3a8adadf60b6e20120506a6 /source3
parent4330efe0f22b7318058867a554222c3c0049f644 (diff)
downloadsamba-20bcdf85f16216c45ded886217fedc4516cc591c.tar.gz
samba-20bcdf85f16216c45ded886217fedc4516cc591c.tar.bz2
samba-20bcdf85f16216c45ded886217fedc4516cc591c.zip
s3: Fix _samr_GetAliasMembership for results with 0 rids
Diffstat (limited to 'source3')
-rw-r--r--source3/rpc_server/srv_samr_nt.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/source3/rpc_server/srv_samr_nt.c b/source3/rpc_server/srv_samr_nt.c
index 2bfd6c3a89..6b40385744 100644
--- a/source3/rpc_server/srv_samr_nt.c
+++ b/source3/rpc_server/srv_samr_nt.c
@@ -5361,6 +5361,14 @@ NTSTATUS _samr_GetAliasMembership(pipes_struct *p,
r->out.rids->count = num_alias_rids;
r->out.rids->ids = alias_rids;
+ if (r->out.rids->ids == NULL) {
+ /* Windows domain clients don't accept a NULL ptr here */
+ r->out.rids->ids = talloc_zero(p->mem_ctx, uint32_t);
+ }
+ if (r->out.rids->ids == NULL) {
+ return NT_STATUS_NO_MEMORY;
+ }
+
return NT_STATUS_OK;
}