diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2009-04-23 14:27:59 +0200 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2009-04-23 18:27:31 +0200 |
commit | 9b64073cf733588b75c3780f2c18728ff3009500 (patch) | |
tree | 9e0a2a4b0489d3322be1a1c06ec68f594d844143 /source3/libads | |
parent | 90cc5e72ba0cf4b5261be2f2aa9db87bd011fbb0 (diff) | |
download | samba-9b64073cf733588b75c3780f2c18728ff3009500.tar.gz samba-9b64073cf733588b75c3780f2c18728ff3009500.tar.bz2 samba-9b64073cf733588b75c3780f2c18728ff3009500.zip |
ldb/samba3: Support event context argument to ldb_init().
This argument is ignored (Samba3's LDB is synchronous) but having it
there is useful for API compatibility with the LDB used by Samba 4 and
available on some systems.
Diffstat (limited to 'source3/libads')
-rw-r--r-- | source3/libads/ldap.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source3/libads/ldap.c b/source3/libads/ldap.c index cc72d81b86..44a73cbfdb 100644 --- a/source3/libads/ldap.c +++ b/source3/libads/ldap.c @@ -3858,6 +3858,7 @@ ADS_STATUS ads_check_ou_dn(TALLOC_CTX *mem_ctx, struct ldb_dn *name_dn = NULL; const char *name = NULL; char *ou_string = NULL; + struct ldb_context *ldb = ldb_init(mem_ctx, NULL); name_dn = ldb_dn_explode(mem_ctx, *account_ou); if (name_dn) { @@ -3883,9 +3884,11 @@ ADS_STATUS ads_check_ou_dn(TALLOC_CTX *mem_ctx, *account_ou = talloc_strdup(mem_ctx, name); if (!*account_ou) { + talloc_free(ldb); return ADS_ERROR_LDAP(LDAP_NO_MEMORY); } + talloc_free(ldb); return ADS_SUCCESS; } |