summaryrefslogtreecommitdiff
path: root/source/lib/netapi/user.c
diff options
context:
space:
mode:
authorbubulle <bubulle@alioth.debian.org>2009-04-02 15:54:13 +0000
committerbubulle <bubulle@alioth.debian.org>2009-04-02 15:54:13 +0000
commitbf9afdb5c20707c5af271cbdfd98f0bb60180eb1 (patch)
treef72e29d251d990358e3a080aa35c801104fa54ba /source/lib/netapi/user.c
parentfe09995a9ad2d43523063725462194c7b39a3ce9 (diff)
downloadsamba-bf9afdb5c20707c5af271cbdfd98f0bb60180eb1.tar.gz
merge upstream 3.3.3
git-svn-id: svn://svn.debian.org/svn/pkg-samba/trunk/samba@2683 fc4039ab-9d04-0410-8cac-899223bdd6b0
Diffstat (limited to 'source/lib/netapi/user.c')
-rw-r--r--source/lib/netapi/user.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/source/lib/netapi/user.c b/source/lib/netapi/user.c
index 1f4b03f677..2c78f6f8ad 100644
--- 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;
+ WERROR werr_tmp;
+
+ *r->out.entries_read = 0;
ZERO_STRUCT(connect_handle);
ZERO_STRUCT(domain_handle);
@@ -1554,15 +1557,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;
@@ -2849,6 +2855,7 @@ WERROR NetUserGetGroups_r(struct libnetapi_ctx *ctx,
*r->out.buffer = NULL;
*r->out.entries_read = 0;
+ *r->out.total_entries = 0;
switch (r->in.level) {
case 0:
@@ -2943,12 +2950,8 @@ WERROR NetUserGetGroups_r(struct libnetapi_ctx *ctx,
}
}
- if (r->out.entries_read) {
- *r->out.entries_read = entries_read;
- }
- if (r->out.total_entries) {
- *r->out.total_entries = entries_read;
- }
+ *r->out.entries_read = entries_read;
+ *r->out.total_entries = entries_read;
done:
if (!cli) {
@@ -3297,6 +3300,7 @@ WERROR NetUserGetLocalGroups_r(struct libnetapi_ctx *ctx,
*r->out.buffer = NULL;
*r->out.entries_read = 0;
+ *r->out.total_entries = 0;
switch (r->in.level) {
case 0:
@@ -3458,12 +3462,8 @@ WERROR NetUserGetLocalGroups_r(struct libnetapi_ctx *ctx,
}
}
- if (r->out.entries_read) {
- *r->out.entries_read = entries_read;
- }
- if (r->out.total_entries) {
- *r->out.total_entries = entries_read;
- }
+ *r->out.entries_read = entries_read;
+ *r->out.total_entries = entries_read;
done:
if (!cli) {