s3-samr-server: fix return code in _samr_QueryDisplayInformation.
authorGünther Deschner <gd@samba.org>
Thu, 23 Oct 2008 01:30:14 +0000 (03:30 +0200)
committerKarolin Seeger <kseeger@samba.org>
Tue, 9 Dec 2008 10:39:01 +0000 (11:39 +0100)
Guenther
(cherry picked from commit 30fa6c3ba19a8f816043405ba5d9eec84dd1c97b)
(cherry picked from commit 0f6a80fb198f3cc4ffc875c77da3ff3d8b8c5ca3)

source/rpc_server/srv_samr_nt.c

index ac3cdfa09aa336754b15e9657732246a705a2872..d4de94f44e27185323bb0f5fa7a88d5521e9ba3b 100644 (file)
@@ -1648,7 +1648,7 @@ NTSTATUS _samr_QueryDisplayInfo(pipes_struct *p,
        /* calculate the total size */
        total_data_size=num_account*struct_size;
 
-       if (num_account) {
+       if (max_entries <= num_account) {
                status = STATUS_MORE_ENTRIES;
        } else {
                status = NT_STATUS_OK;