summaryrefslogtreecommitdiffstats
path: root/source/nsswitch
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2002-04-11 14:30:31 +0000
committerAndrew Tridgell <tridge@samba.org>2002-04-11 14:30:31 +0000
commitdfa990170bb9a665ba48443258e2a87f50baa75c (patch)
treefd13ab017d665ccd9c954e7c80be1ad2de31e177 /source/nsswitch
parent91a3ccd3e790f980421c1ee93388e19e87026b29 (diff)
downloadsamba-dfa990170bb9a665ba48443258e2a87f50baa75c.tar.gz
samba-dfa990170bb9a665ba48443258e2a87f50baa75c.tar.xz
samba-dfa990170bb9a665ba48443258e2a87f50baa75c.zip
possibly fix the 15000 user problem
I think its caused by a rpc operation failing and us giving invalid data back to the cache layer. Using talloc_zero() should solve this.
Diffstat (limited to 'source/nsswitch')
-rw-r--r--source/nsswitch/winbindd_ads.c12
-rw-r--r--source/nsswitch/winbindd_rpc.c4
2 files changed, 8 insertions, 8 deletions
diff --git a/source/nsswitch/winbindd_ads.c b/source/nsswitch/winbindd_ads.c
index 2206c5a36e2..22bad667c3c 100644
--- a/source/nsswitch/winbindd_ads.c
+++ b/source/nsswitch/winbindd_ads.c
@@ -220,7 +220,7 @@ static NTSTATUS query_user_list(struct winbindd_domain *domain,
goto done;
}
- (*info) = talloc(mem_ctx, count * sizeof(**info));
+ (*info) = talloc_zero(mem_ctx, count * sizeof(**info));
if (!*info) {
status = NT_STATUS_NO_MEMORY;
goto done;
@@ -308,7 +308,7 @@ static NTSTATUS enum_dom_groups(struct winbindd_domain *domain,
goto done;
}
- (*info) = talloc(mem_ctx, count * sizeof(**info));
+ (*info) = talloc_zero(mem_ctx, count * sizeof(**info));
if (!*info) {
status = NT_STATUS_NO_MEMORY;
goto done;
@@ -628,7 +628,7 @@ static NTSTATUS lookup_usergroups(struct winbindd_domain *domain,
}
count = ads_pull_sids(ads, mem_ctx, msg, "tokenGroups", &sids) + 1;
- (*user_gids) = (uint32 *)talloc(mem_ctx, sizeof(uint32) * count);
+ (*user_gids) = (uint32 *)talloc_zero(mem_ctx, sizeof(uint32) * count);
(*user_gids)[(*num_groups)++] = primary_group;
for (i=1;i<count;i++) {
@@ -690,9 +690,9 @@ static NTSTATUS lookup_groupmem(struct winbindd_domain *domain,
goto done;
}
- (*rid_mem) = talloc(mem_ctx, sizeof(uint32) * count);
- (*name_types) = talloc(mem_ctx, sizeof(uint32) * count);
- (*names) = talloc(mem_ctx, sizeof(char *) * count);
+ (*rid_mem) = talloc_zero(mem_ctx, sizeof(uint32) * count);
+ (*name_types) = talloc_zero(mem_ctx, sizeof(uint32) * count);
+ (*names) = talloc_zero(mem_ctx, sizeof(char *) * count);
for (msg = ads_first_entry(ads, res); msg; msg = ads_next_entry(ads, msg)) {
uint32 atype, rid;
diff --git a/source/nsswitch/winbindd_rpc.c b/source/nsswitch/winbindd_rpc.c
index 53c39b2f570..5af42ee041b 100644
--- a/source/nsswitch/winbindd_rpc.c
+++ b/source/nsswitch/winbindd_rpc.c
@@ -447,8 +447,8 @@ static NTSTATUS lookup_groupmem(struct winbindd_domain *domain,
#define MAX_LOOKUP_RIDS 900
- *names = talloc(mem_ctx, *num_names * sizeof(char *));
- *name_types = talloc(mem_ctx, *num_names * sizeof(uint32));
+ *names = talloc_zero(mem_ctx, *num_names * sizeof(char *));
+ *name_types = talloc_zero(mem_ctx, *num_names * sizeof(uint32));
for (i = 0; i < *num_names; i += MAX_LOOKUP_RIDS) {
int num_lookup_rids = MIN(*num_names - i, MAX_LOOKUP_RIDS);