summaryrefslogtreecommitdiff
path: root/source3/lib/netapi/user.c
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2009-03-26 15:28:18 +0100
committerJelmer Vernooij <jelmer@samba.org>2009-03-26 15:28:18 +0100
commit30a3dec549dc408940710409c80276077b4d9701 (patch)
treeb0c0106ccbb9874875100ae5e18ec301e5c9f777 /source3/lib/netapi/user.c
parentc42fc5e103d9d210c2f370e237a952e6df361792 (diff)
parent853f9283fb8fbcd2078e3cf8e99d6c8e24d77346 (diff)
downloadsamba-30a3dec549dc408940710409c80276077b4d9701.tar.gz
samba-30a3dec549dc408940710409c80276077b4d9701.tar.bz2
samba-30a3dec549dc408940710409c80276077b4d9701.zip
Merge branch 'master' of ssh://git.samba.org/data/git/samba into displaysec
Diffstat (limited to 'source3/lib/netapi/user.c')
-rw-r--r--source3/lib/netapi/user.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/source3/lib/netapi/user.c b/source3/lib/netapi/user.c
index e760a8b1de..1cbb883169 100644
--- a/source3/lib/netapi/user.c
+++ b/source3/lib/netapi/user.c
@@ -1497,6 +1497,9 @@ WERROR NetQueryDisplayInformation_r(struct libnetapi_ctx *ctx,
NTSTATUS status = NT_STATUS_OK;
WERROR werr;
+ WERROR werr_tmp;
+
+ *r->out.entries_read = 0;
ZERO_STRUCT(connect_handle);
ZERO_STRUCT(domain_handle);
@@ -1540,15 +1543,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 last query */
if (NT_STATUS_IS_OK(status) ||