summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/auth/server_info.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/source3/auth/server_info.c b/source3/auth/server_info.c
index 1ef272489c..a43c4f931a 100644
--- a/source3/auth/server_info.c
+++ b/source3/auth/server_info.c
@@ -308,7 +308,7 @@ NTSTATUS samu_to_SamInfo3(TALLOC_CTX *mem_ctx,
const struct dom_sid *group_sid;
struct dom_sid domain_sid;
struct dom_sid *group_sids;
- size_t num_group_sids;
+ size_t num_group_sids = 0;
const char *tmp;
gid_t *gids;
NTSTATUS status;
@@ -441,10 +441,12 @@ NTSTATUS samu_to_SamInfo3(TALLOC_CTX *mem_ctx,
return status;
}
- status = group_sids_to_info3(info3, group_sids, num_group_sids);
- if (!NT_STATUS_IS_OK(status)) {
- TALLOC_FREE(info3);
- return status;
+ if (num_group_sids) {
+ status = group_sids_to_info3(info3, group_sids, num_group_sids);
+ if (!NT_STATUS_IS_OK(status)) {
+ TALLOC_FREE(info3);
+ return status;
+ }
}
/* We don't need sids and gids after the conversion */