s3-samr: _samr_EnumDomainUsers always returns a sam array (even w/o users).
authorGünther Deschner <gd@samba.org>
Mon, 1 Dec 2008 23:08:56 +0000 (00:08 +0100)
committerGünther Deschner <gd@samba.org>
Mon, 1 Dec 2008 23:53:27 +0000 (00:53 +0100)
Guenther

source3/rpc_server/srv_samr_nt.c

index 7baab1c86f6919bc5282a37ce4d8994909b56caa..dc2377b90259d2f3fd80807032e5e9d8c9a5350c 100644 (file)
@@ -1012,6 +1012,7 @@ NTSTATUS _samr_EnumDomainUsers(pipes_struct *p,
        if (!samr_array) {
                return NT_STATUS_NO_MEMORY;
        }
        if (!samr_array) {
                return NT_STATUS_NO_MEMORY;
        }
+       *r->out.sam = samr_array;
 
        become_root();
 
 
        become_root();
 
@@ -1071,7 +1072,6 @@ NTSTATUS _samr_EnumDomainUsers(pipes_struct *p,
        samr_array->entries = samr_entries;
 
        *r->out.resume_handle = *r->in.resume_handle + num_account;
        samr_array->entries = samr_entries;
 
        *r->out.resume_handle = *r->in.resume_handle + num_account;
-       *r->out.sam = samr_array;
        *r->out.num_entries = num_account;
 
        DEBUG(5,("_samr_EnumDomainUsers: %d\n", __LINE__));
        *r->out.num_entries = num_account;
 
        DEBUG(5,("_samr_EnumDomainUsers: %d\n", __LINE__));