summaryrefslogtreecommitdiffstats
path: root/src/providers
diff options
context:
space:
mode:
Diffstat (limited to 'src/providers')
-rw-r--r--src/providers/ldap/sdap_async_connection.c18
-rw-r--r--src/providers/ldap/sdap_utils.c18
2 files changed, 18 insertions, 18 deletions
diff --git a/src/providers/ldap/sdap_async_connection.c b/src/providers/ldap/sdap_async_connection.c
index 7103976e6..abc5b1755 100644
--- a/src/providers/ldap/sdap_async_connection.c
+++ b/src/providers/ldap/sdap_async_connection.c
@@ -30,24 +30,6 @@
#include "providers/ldap/sdap_async_private.h"
#include "providers/ldap/ldap_common.h"
-errno_t deref_string_to_val(const char *str, int *val)
-{
- if (strcasecmp(str, "never") == 0) {
- *val = LDAP_DEREF_NEVER;
- } else if (strcasecmp(str, "searching") == 0) {
- *val = LDAP_DEREF_SEARCHING;
- } else if (strcasecmp(str, "finding") == 0) {
- *val = LDAP_DEREF_FINDING;
- } else if (strcasecmp(str, "always") == 0) {
- *val = LDAP_DEREF_ALWAYS;
- } else {
- DEBUG(SSSDBG_CRIT_FAILURE, "Illegal deref option [%s].\n", str);
- return EINVAL;
- }
-
- return EOK;
-}
-
/* ==Connect-to-LDAP-Server=============================================== */
struct sdap_rebind_proc_params {
diff --git a/src/providers/ldap/sdap_utils.c b/src/providers/ldap/sdap_utils.c
index 194f4a133..d1e886d4c 100644
--- a/src/providers/ldap/sdap_utils.c
+++ b/src/providers/ldap/sdap_utils.c
@@ -140,3 +140,21 @@ done:
talloc_free(tmp_ctx);
return ret;
}
+
+errno_t deref_string_to_val(const char *str, int *val)
+{
+ if (strcasecmp(str, "never") == 0) {
+ *val = LDAP_DEREF_NEVER;
+ } else if (strcasecmp(str, "searching") == 0) {
+ *val = LDAP_DEREF_SEARCHING;
+ } else if (strcasecmp(str, "finding") == 0) {
+ *val = LDAP_DEREF_FINDING;
+ } else if (strcasecmp(str, "always") == 0) {
+ *val = LDAP_DEREF_ALWAYS;
+ } else {
+ DEBUG(SSSDBG_CRIT_FAILURE, "Illegal deref option [%s].\n", str);
+ return EINVAL;
+ }
+
+ return EOK;
+}