summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2003-01-13 23:07:26 +0000
committerJeremy Allison <jra@samba.org>2003-01-13 23:07:26 +0000
commit2467a2f0ce1a99f933773f295c8146c5cd3e66c0 (patch)
tree08551b73351838a3fc42f5c2b594c674f4456a0c
parent2a6bc4302e6a7faff287956d29481967a7942930 (diff)
downloadsamba-2467a2f0ce1a99f933773f295c8146c5cd3e66c0.tar.gz
samba-2467a2f0ce1a99f933773f295c8146c5cd3e66c0.tar.bz2
samba-2467a2f0ce1a99f933773f295c8146c5cd3e66c0.zip
Merge of indirection fixes from HEAD.
Jeremy (This used to be commit 67a0b30f50aa323185cbcf3a9d39804239222480)
-rw-r--r--source3/auth/auth_util.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/source3/auth/auth_util.c b/source3/auth/auth_util.c
index dd3f55539f..0a27e6176d 100644
--- a/source3/auth/auth_util.c
+++ b/source3/auth/auth_util.c
@@ -681,7 +681,7 @@ static NTSTATUS get_user_groups_from_local_sam(const DOM_SID *user_sid,
*unix_groups = Realloc(unix_groups, sizeof(gid_t) * n_unix_groups);
if (sys_getgrouplist(usr->pw_name, usr->pw_gid, *unix_groups, &n_unix_groups) == -1) {
DEBUG(0, ("get_user_groups_from_local_sam: failed to get the unix group list\n"));
- SAFE_FREE(unix_groups);
+ SAFE_FREE(*unix_groups);
passwd_free(&usr);
return NT_STATUS_NO_SUCH_USER; /* what should this return value be? */
}
@@ -695,7 +695,7 @@ static NTSTATUS get_user_groups_from_local_sam(const DOM_SID *user_sid,
*groups = malloc(sizeof(DOM_SID) * n_unix_groups);
if (!*groups) {
DEBUG(0, ("get_user_group_from_local_sam: malloc() failed for DOM_SID list!\n"));
- SAFE_FREE(unix_groups);
+ SAFE_FREE(*unix_groups);
return NT_STATUS_NO_MEMORY;
}
}
@@ -704,9 +704,9 @@ static NTSTATUS get_user_groups_from_local_sam(const DOM_SID *user_sid,
for (i = 0; i < *n_groups; i++) {
if (!gid_to_sid(&(*groups)[i], (*unix_groups)[i])) {
- DEBUG(1, ("get_user_groups_from_local_sam: failed to convert gid %ld to a sid!\n", (long int)unix_groups[i+1]));
- SAFE_FREE(groups);
- SAFE_FREE(unix_groups);
+ DEBUG(1, ("get_user_groups_from_local_sam: failed to convert gid %ld to a sid!\n", (long int)(*unix_groups)[i+1]));
+ SAFE_FREE(*groups);
+ SAFE_FREE(*unix_groups);
return NT_STATUS_NO_SUCH_USER;
}
}