summaryrefslogtreecommitdiff
path: root/source3/nsswitch
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2007-04-27 23:18:41 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:19:44 -0500
commit12ba88574bf91bdcc4447bfc3d429b799064bfd9 (patch)
tree17f9b68292eb277da8c71871f8cad332c43d3a5a /source3/nsswitch
parentfdc0b87083496ae9d6d9d3d1d1a71dddaca24da2 (diff)
downloadsamba-12ba88574bf91bdcc4447bfc3d429b799064bfd9.tar.gz
samba-12ba88574bf91bdcc4447bfc3d429b799064bfd9.tar.bz2
samba-12ba88574bf91bdcc4447bfc3d429b799064bfd9.zip
r22542: Move over to using the _strict varients of the talloc
calls. No functional changes. Looks bigger than it is :-). Jeremy. (This used to be commit f6fa3080fee1b20df9f1968500840a88cf0ee592)
Diffstat (limited to 'source3/nsswitch')
-rw-r--r--source3/nsswitch/idmap.c16
-rw-r--r--source3/nsswitch/idmap_ad.c2
-rw-r--r--source3/nsswitch/idmap_ldap.c4
-rw-r--r--source3/nsswitch/idmap_rid.c2
-rw-r--r--source3/nsswitch/idmap_tdb.c2
-rw-r--r--source3/nsswitch/winbindd_async.c4
6 files changed, 15 insertions, 15 deletions
diff --git a/source3/nsswitch/idmap.c b/source3/nsswitch/idmap.c
index 7589ee66ab..26fcc692e9 100644
--- a/source3/nsswitch/idmap.c
+++ b/source3/nsswitch/idmap.c
@@ -360,7 +360,7 @@ NTSTATUS idmap_init(void)
}
/* init domain */
- dom = talloc_zero(idmap_ctx, struct idmap_domain);
+ dom = TALLOC_ZERO_P(idmap_ctx, struct idmap_domain);
IDMAP_CHECK_ALLOC(dom);
dom->name = talloc_strdup(dom, dom_list[i]);
@@ -464,7 +464,7 @@ NTSTATUS idmap_init(void)
( ! pri_dom_is_in_list) &&
lp_winbind_trusted_domains_only()) {
- dom = talloc_zero(idmap_ctx, struct idmap_domain);
+ dom = TALLOC_ZERO_P(idmap_ctx, struct idmap_domain);
IDMAP_CHECK_ALLOC(dom);
dom->name = talloc_strdup(dom, lp_workgroup());
@@ -515,7 +515,7 @@ NTSTATUS idmap_init(void)
}
/**** automatically add idmap_passdb backend ****/
- dom = talloc_zero(idmap_ctx, struct idmap_domain);
+ dom = TALLOC_ZERO_P(idmap_ctx, struct idmap_domain);
IDMAP_CHECK_ALLOC(dom);
dom->name = talloc_strdup(dom, get_global_sam_name());
@@ -607,7 +607,7 @@ NTSTATUS idmap_init(void)
if ( alloc_backend ) {
- idmap_alloc_ctx = talloc_zero(idmap_ctx, struct idmap_alloc_context);
+ idmap_alloc_ctx = TALLOC_ZERO_P(idmap_ctx, struct idmap_alloc_context);
IDMAP_CHECK_ALLOC(idmap_alloc_ctx);
idmap_alloc_ctx->methods = get_alloc_methods(alloc_backends, alloc_backend);
@@ -1026,9 +1026,9 @@ static NTSTATUS idmap_backends_sids_to_unixids(struct id_map **ids)
/* split list per domain */
- dom_ids = talloc_zero_array(ctx, struct id_map **, num_domains);
+ dom_ids = TALLOC_ZERO_ARRAY(ctx, struct id_map **, num_domains);
IDMAP_CHECK_ALLOC(dom_ids);
- counters = talloc_zero_array(ctx, int, num_domains);
+ counters = TALLOC_ZERO_ARRAY(ctx, int, num_domains);
/* partition the requests by domain */
@@ -1143,7 +1143,7 @@ NTSTATUS idmap_unixids_to_sids(struct id_map **ids)
if ( ! bids) {
/* alloc space for ids to be resolved by backends (realloc ten by ten) */
- bids = talloc_array(ctx, struct id_map *, 10);
+ bids = TALLOC_ARRAY(ctx, struct id_map *, 10);
if ( ! bids) {
DEBUG(1, ("Out of memory!\n"));
talloc_free(ctx);
@@ -1248,7 +1248,7 @@ NTSTATUS idmap_sids_to_unixids(struct id_map **ids)
if ( ! bids) {
/* alloc space for ids to be resolved
by backends (realloc ten by ten) */
- bids = talloc_array(ctx, struct id_map *, 10);
+ bids = TALLOC_ARRAY(ctx, struct id_map *, 10);
if ( ! bids) {
DEBUG(1, ("Out of memory!\n"));
talloc_free(ctx);
diff --git a/source3/nsswitch/idmap_ad.c b/source3/nsswitch/idmap_ad.c
index e15e4b90fb..d3fd9e1c8a 100644
--- a/source3/nsswitch/idmap_ad.c
+++ b/source3/nsswitch/idmap_ad.c
@@ -167,7 +167,7 @@ static NTSTATUS idmap_ad_initialize(struct idmap_domain *dom)
const char *range = NULL;
const char *schema_mode = NULL;
- if ( (ctx = talloc_zero(dom, struct idmap_ad_context)) == NULL ) {
+ if ( (ctx = TALLOC_ZERO(dom, struct idmap_ad_context)) == NULL ) {
DEBUG(0, ("Out of memory!\n"));
return NT_STATUS_NO_MEMORY;
}
diff --git a/source3/nsswitch/idmap_ldap.c b/source3/nsswitch/idmap_ldap.c
index 7575416af5..2fb9a17d3f 100644
--- a/source3/nsswitch/idmap_ldap.c
+++ b/source3/nsswitch/idmap_ldap.c
@@ -216,7 +216,7 @@ static NTSTATUS idmap_ldap_alloc_init(const char *params)
return NT_STATUS_FILE_IS_OFFLINE;
}
- idmap_alloc_ldap = talloc_zero(NULL, struct idmap_ldap_alloc_context);
+ idmap_alloc_ldap = TALLOC_ZERO_P(NULL, struct idmap_ldap_alloc_context);
CHECK_ALLOC_DONE( idmap_alloc_ldap );
/* load ranges */
@@ -736,7 +736,7 @@ static NTSTATUS idmap_ldap_db_init(struct idmap_domain *dom)
return NT_STATUS_FILE_IS_OFFLINE;
}
- ctx = talloc_zero(dom, struct idmap_ldap_context);
+ ctx = TALLOC_ZERO_P(dom, struct idmap_ldap_context);
if ( ! ctx) {
DEBUG(0, ("Out of memory!\n"));
return NT_STATUS_NO_MEMORY;
diff --git a/source3/nsswitch/idmap_rid.c b/source3/nsswitch/idmap_rid.c
index 8e016879b8..1daf511dda 100644
--- a/source3/nsswitch/idmap_rid.c
+++ b/source3/nsswitch/idmap_rid.c
@@ -44,7 +44,7 @@ static NTSTATUS idmap_rid_initialize(struct idmap_domain *dom)
char *config_option = NULL;
const char *range;
- if ( (ctx = talloc_zero(dom, struct idmap_rid_context)) == NULL ) {
+ if ( (ctx = TALLOC_ZERO(dom, struct idmap_rid_context)) == NULL ) {
DEBUG(0, ("Out of memory!\n"));
return NT_STATUS_NO_MEMORY;
}
diff --git a/source3/nsswitch/idmap_tdb.c b/source3/nsswitch/idmap_tdb.c
index 4eb47c42b8..2961229e49 100644
--- a/source3/nsswitch/idmap_tdb.c
+++ b/source3/nsswitch/idmap_tdb.c
@@ -1176,7 +1176,7 @@ static NTSTATUS idmap_tdb_dump_data(struct idmap_domain *dom, struct id_map **ma
ctx = talloc_get_type(dom->private_data, struct idmap_tdb_context);
- data = talloc_zero(ctx, struct dump_data);
+ data = TALLOC_ZERO_P(ctx, struct dump_data);
if ( ! data) {
DEBUG(0, ("Out of memory!\n"));
return NT_STATUS_NO_MEMORY;
diff --git a/source3/nsswitch/winbindd_async.c b/source3/nsswitch/winbindd_async.c
index aa48f513e9..a8a92c3cae 100644
--- a/source3/nsswitch/winbindd_async.c
+++ b/source3/nsswitch/winbindd_async.c
@@ -276,13 +276,13 @@ enum winbindd_result winbindd_dual_sids2xids(struct winbindd_domain *domain,
sids = (DOM_SID *)state->request.extra_data.data;
num = state->request.extra_len / sizeof(DOM_SID);
- ids = talloc_zero_array(state->mem_ctx, struct id_map *, num + 1);
+ ids = TALLOC_ZERO_ARRAY(state->mem_ctx, struct id_map *, num + 1);
if ( ! ids) {
DEBUG(0, ("Out of memory!\n"));
return WINBINDD_ERROR;
}
for (i = 0; i < num; i++) {
- ids[i] = talloc(ids, struct id_map);
+ ids[i] = TALLOC_P(ids, struct id_map);
if ( ! ids[i]) {
DEBUG(0, ("Out of memory!\n"));
talloc_free(ids);