summaryrefslogtreecommitdiff
path: root/source3/lib/smbldap.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2009-03-18 15:29:02 +1100
committerGünther Deschner <gd@samba.org>2009-04-06 14:52:51 +0200
commit9512640155f3f249e4fd5ad076375592cbd65fc6 (patch)
treeee0e31db1f5d134bdfd8d54001e0a643816a8920 /source3/lib/smbldap.c
parenta2d5fe4a0501058aa2b20f4571e382fd629e446b (diff)
downloadsamba-9512640155f3f249e4fd5ad076375592cbd65fc6.tar.gz
samba-9512640155f3f249e4fd5ad076375592cbd65fc6.tar.bz2
samba-9512640155f3f249e4fd5ad076375592cbd65fc6.zip
s3:smbldap Remove smbldap_get_dn
This removes one more caller to pull_utf8_allocate() Signed-off-by: Günther Deschner <gd@samba.org>
Diffstat (limited to 'source3/lib/smbldap.c')
-rw-r--r--source3/lib/smbldap.c30
1 files changed, 4 insertions, 26 deletions
diff --git a/source3/lib/smbldap.c b/source3/lib/smbldap.c
index e24d35818c..1dfb02035d 100644
--- a/source3/lib/smbldap.c
+++ b/source3/lib/smbldap.c
@@ -1649,41 +1649,19 @@ NTSTATUS smbldap_init(TALLOC_CTX *mem_ctx, struct event_context *event_ctx,
return NT_STATUS_OK;
}
-/*******************************************************************
- Return a copy of the DN for a LDAPMessage. Convert from utf8 to CH_UNIX.
-********************************************************************/
-char *smbldap_get_dn(LDAP *ld, LDAPMessage *entry)
-{
- char *utf8_dn, *unix_dn;
- size_t converted_size;
-
- utf8_dn = ldap_get_dn(ld, entry);
- if (!utf8_dn) {
- DEBUG (5, ("smbldap_get_dn: ldap_get_dn failed\n"));
- return NULL;
- }
- if (!pull_utf8_allocate(&unix_dn, utf8_dn, &converted_size)) {
- DEBUG (0, ("smbldap_get_dn: String conversion failure utf8 "
- "[%s]\n", utf8_dn));
- return NULL;
- }
- ldap_memfree(utf8_dn);
- return unix_dn;
-}
-
- const char *smbldap_talloc_dn(TALLOC_CTX *mem_ctx, LDAP *ld,
- LDAPMessage *entry)
+ char *smbldap_talloc_dn(TALLOC_CTX *mem_ctx, LDAP *ld,
+ LDAPMessage *entry)
{
char *utf8_dn, *unix_dn;
size_t converted_size;
utf8_dn = ldap_get_dn(ld, entry);
if (!utf8_dn) {
- DEBUG (5, ("smbldap_get_dn: ldap_get_dn failed\n"));
+ DEBUG (5, ("smbldap_talloc_dn: ldap_get_dn failed\n"));
return NULL;
}
if (!pull_utf8_talloc(mem_ctx, &unix_dn, utf8_dn, &converted_size)) {
- DEBUG (0, ("smbldap_get_dn: String conversion failure utf8 "
+ DEBUG (0, ("smbldap_talloc_dn: String conversion failure utf8 "
"[%s]\n", utf8_dn));
return NULL;
}