summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2014-07-07 21:33:32 +0200
committerJakub Hrozek <jhrozek@redhat.com>2014-07-08 20:28:11 +0200
commit88eac3adf8424b65195e725ff724c79d38500e1d (patch)
treeadfa115a95347baf5fb77e9ed7f6108d5493650c /src
parent34de8a00f5b480ef3f46d2516e072e4acf1ebf87 (diff)
downloadsssd-88eac3adf8424b65195e725ff724c79d38500e1d.tar.gz
sssd-88eac3adf8424b65195e725ff724c79d38500e1d.tar.xz
sssd-88eac3adf8424b65195e725ff724c79d38500e1d.zip
SDAP: Remove unused function sdap_get_msg_dn
This function was not used since 2009. Unused and untested function would just rot, better to remove it completely. Reviewed-by: Michal Židek <mzidek@redhat.com>
Diffstat (limited to 'src')
-rw-r--r--src/providers/ldap/sdap.c31
-rw-r--r--src/providers/ldap/sdap.h3
2 files changed, 0 insertions, 34 deletions
diff --git a/src/providers/ldap/sdap.c b/src/providers/ldap/sdap.c
index 4bb701187..90cc76017 100644
--- a/src/providers/ldap/sdap.c
+++ b/src/providers/ldap/sdap.c
@@ -686,37 +686,6 @@ done:
return ret;
}
-/* =Get-DN-from-message=================================================== */
-
-int sdap_get_msg_dn(TALLOC_CTX *memctx, struct sdap_handle *sh,
- struct sdap_msg *sm, char **_dn)
-{
- char *str;
- int lerrno;
- int ret;
-
- lerrno = 0;
- ret = ldap_set_option(sh->ldap, LDAP_OPT_RESULT_CODE, &lerrno);
- if (ret != LDAP_OPT_SUCCESS) {
- DEBUG(SSSDBG_CRIT_FAILURE, "ldap_set_option failed [%s], ignored.\n",
- sss_ldap_err2string(ret));
- }
-
- str = ldap_get_dn(sh->ldap, sm->msg);
- if (!str) {
- ldap_get_option(sh->ldap, LDAP_OPT_RESULT_CODE, &lerrno);
- DEBUG(SSSDBG_CRIT_FAILURE, "ldap_get_dn failed: %d(%s)\n",
- lerrno, sss_ldap_err2string(lerrno));
- return EIO;
- }
-
- *_dn = talloc_strdup(memctx, str);
- ldap_memfree(str);
- if (!*_dn) return ENOMEM;
-
- return EOK;
-}
-
errno_t setup_tls_config(struct dp_option *basic_opts)
{
int ret;
diff --git a/src/providers/ldap/sdap.h b/src/providers/ldap/sdap.h
index d5366ad89..87f2131ae 100644
--- a/src/providers/ldap/sdap.h
+++ b/src/providers/ldap/sdap.h
@@ -504,9 +504,6 @@ errno_t sdap_parse_deref(TALLOC_CTX *mem_ctx,
LDAPDerefRes *dref,
struct sdap_deref_attrs ***_res);
-int sdap_get_msg_dn(TALLOC_CTX *memctx, struct sdap_handle *sh,
- struct sdap_msg *sm, char **_dn);
-
errno_t setup_tls_config(struct dp_option *basic_opts);
int sdap_set_rootdse_supported_lists(struct sysdb_attrs *rootdse,