summaryrefslogtreecommitdiff
path: root/source3/libads/ldap.c
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2009-04-07 00:40:46 +0200
committerGünther Deschner <gd@samba.org>2009-04-07 01:17:30 +0200
commitd71dec9259366e99beca69fcd9397bd38ed82c71 (patch)
tree963204bf8ced95db535348c57542edbbf3db26a3 /source3/libads/ldap.c
parenteeddbb6f8466d285fd103a3a4da9ebf5afbcb613 (diff)
downloadsamba-d71dec9259366e99beca69fcd9397bd38ed82c71.tar.gz
samba-d71dec9259366e99beca69fcd9397bd38ed82c71.tar.bz2
samba-d71dec9259366e99beca69fcd9397bd38ed82c71.zip
s3-libads: avoid NULL talloc context with ads_get_dn().
Guenther
Diffstat (limited to 'source3/libads/ldap.c')
-rw-r--r--source3/libads/ldap.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/source3/libads/ldap.c b/source3/libads/ldap.c
index d274377259..841ea8caae 100644
--- a/source3/libads/ldap.c
+++ b/source3/libads/ldap.c
@@ -1629,7 +1629,7 @@ char *ads_default_ou_string(ADS_STRUCT *ads, const char *wknguid)
}
/* substitute the bind-path from the well-known-guid-search result */
- wkn_dn = ads_get_dn(ads, NULL, res);
+ wkn_dn = ads_get_dn(ads, talloc_tos(), res);
if (!wkn_dn) {
goto out;
}
@@ -1731,7 +1731,7 @@ uint32 ads_get_kvno(ADS_STRUCT *ads, const char *account_name)
return kvno;
}
- dn_string = ads_get_dn(ads, NULL, res);
+ dn_string = ads_get_dn(ads, talloc_tos(), res);
if (!dn_string) {
DEBUG(0,("ads_get_kvno: out of memory.\n"));
ads_msgfree(ads, res);
@@ -1826,7 +1826,7 @@ ADS_STATUS ads_clear_service_principal_names(ADS_STRUCT *ads, const char *machin
talloc_destroy(ctx);
return ret;
}
- dn_string = ads_get_dn(ads, NULL, res);
+ dn_string = ads_get_dn(ads, talloc_tos(), res);
if (!dn_string) {
talloc_destroy(ctx);
ads_msgfree(ads, res);
@@ -2041,7 +2041,7 @@ ADS_STATUS ads_move_machine_acct(ADS_STRUCT *ads, const char *machine_name,
goto done;
}
- computer_dn = ads_get_dn(ads, NULL, res);
+ computer_dn = ads_get_dn(ads, talloc_tos(), res);
if (!computer_dn) {
rc = ADS_ERROR(LDAP_NO_MEMORY);
goto done;
@@ -3129,7 +3129,7 @@ ADS_STATUS ads_get_joinable_ous(ADS_STRUCT *ads,
char *dn = NULL;
- dn = ads_get_dn(ads, NULL, msg);
+ dn = ads_get_dn(ads, talloc_tos(), msg);
if (!dn) {
ads_msgfree(ads, res);
return ADS_ERROR(LDAP_NO_MEMORY);
@@ -3483,7 +3483,7 @@ ADS_STATUS ads_leave_realm(ADS_STRUCT *ads, const char *hostname)
return ADS_ERROR_SYSTEM(ENOENT);
}
- hostnameDN = ads_get_dn(ads, NULL, (LDAPMessage *)msg);
+ hostnameDN = ads_get_dn(ads, talloc_tos(), (LDAPMessage *)msg);
rc = ldap_delete_ext_s(ads->ldap.ld, hostnameDN, pldap_control, NULL);
if (rc) {
@@ -3514,7 +3514,7 @@ ADS_STATUS ads_leave_realm(ADS_STRUCT *ads, const char *hostname)
char *dn = NULL;
- if ((dn = ads_get_dn(ads, NULL, msg_sub)) == NULL) {
+ if ((dn = ads_get_dn(ads, talloc_tos(), msg_sub)) == NULL) {
SAFE_FREE(host);
TALLOC_FREE(hostnameDN);
return ADS_ERROR(LDAP_NO_MEMORY);
@@ -3712,7 +3712,7 @@ ADS_STATUS ads_find_samaccount(ADS_STRUCT *ads,
goto out;
}
- dn = ads_get_dn(ads, NULL, res);
+ dn = ads_get_dn(ads, talloc_tos(), res);
if (dn == NULL) {
status = ADS_ERROR(LDAP_NO_MEMORY);
goto out;