git.samba.org
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
5730172
)
s3-net: Fix Bug #6102. NetQueryDisplayInformation could return wrong information.
author
Günther Deschner
<gd@samba.org>
Thu, 26 Mar 2009 09:35:55 +0000
(10:35 +0100)
committer
Günther Deschner
<gd@samba.org>
Thu, 26 Mar 2009 09:36:36 +0000
(10:36 +0100)
Guenther
source/lib/netapi/user.c
patch
|
blob
|
history
diff --git
a/source/lib/netapi/user.c
b/source/lib/netapi/user.c
index 84d32dc1d55262861f3aea71e8f55b81f1dfebc3..2c78f6f8ada08e0cae142e2eb49705d9bc915267 100644
(file)
--- a/
source/lib/netapi/user.c
+++ b/
source/lib/netapi/user.c
@@
-1510,6
+1510,9
@@
WERROR NetQueryDisplayInformation_r(struct libnetapi_ctx *ctx,
NTSTATUS status = NT_STATUS_OK;
WERROR werr;
NTSTATUS status = NT_STATUS_OK;
WERROR werr;
+ WERROR werr_tmp;
+
+ *r->out.entries_read = 0;
ZERO_STRUCT(connect_handle);
ZERO_STRUCT(domain_handle);
ZERO_STRUCT(connect_handle);
ZERO_STRUCT(domain_handle);
@@
-1554,15
+1557,18
@@
WERROR NetQueryDisplayInformation_r(struct libnetapi_ctx *ctx,
&total_size,
&returned_size,
&info);
&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;
}
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;
done:
if (!cli) {
return werr;