The branch, v3-2-test has been updated
       via  490ed838f2626893bb623ea6ad8d79595c8c44c4 (commit)
      from  1a1823c357fb8e01ac0e8c8749e6f5004bf3cf3e (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test


- Log -----------------------------------------------------------------
commit 490ed838f2626893bb623ea6ad8d79595c8c44c4
Author: Günther Deschner <g...@samba.org>
Date:   Thu Mar 26 10:41:11 2009 +0100

    s3-net: Fix Bug #6102. NetQueryDisplayInformation could return wrong 
information.
    
    Guenther

-----------------------------------------------------------------------

Summary of changes:
 source/lib/netapi/user.c |   18 ++++++++++++------
 1 files changed, 12 insertions(+), 6 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/lib/netapi/user.c b/source/lib/netapi/user.c
index 05a0510..b31d838 100644
--- a/source/lib/netapi/user.c
+++ b/source/lib/netapi/user.c
@@ -899,6 +899,9 @@ WERROR NetQueryDisplayInformation_r(struct libnetapi_ctx 
*ctx,
 
        NTSTATUS status;
        WERROR werr;
+       WERROR werr_tmp;
+
+       *r->out.entries_read = 0;
 
        ZERO_STRUCT(connect_handle);
        ZERO_STRUCT(domain_handle);
@@ -992,15 +995,18 @@ WERROR NetQueryDisplayInformation_r(struct libnetapi_ctx 
*ctx,
                                               &total_size,
                                               &returned_size,
                                               &info);
-       if (!NT_STATUS_IS_OK(status)) {
-               werr = ntstatus_to_werror(status);
+       werr = ntstatus_to_werror(status);
+       if (NT_STATUS_IS_ERR(status)) {
                goto done;
        }
 
-       werr = convert_samr_dispinfo_to_NET_DISPLAY(ctx, &info,
-                                                   r->in.level,
-                                                   r->out.entries_read,
-                                                   r->out.buffer);
+       werr_tmp = convert_samr_dispinfo_to_NET_DISPLAY(ctx, &info,
+                                                       r->in.level,
+                                                       r->out.entries_read,
+                                                       r->out.buffer);
+       if (!W_ERROR_IS_OK(werr_tmp)) {
+               werr = werr_tmp;
+       }
  done:
        if (!cli) {
                return werr;


-- 
Samba Shared Repository

Reply via email to