summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPavel Březina <pbrezina@redhat.com>2014-02-18 13:17:11 +0100
committerJakub Hrozek <jhrozek@redhat.com>2014-02-18 22:57:42 +0100
commit44d0fd9bfdcab991f00ba33c91f49527f8cce595 (patch)
treec49a61eef0616302c704091e6d25656510b28fc4 /src
parent25ac7bda643c8872b5a29bc856c374e76a7f8363 (diff)
downloadsssd-44d0fd9bfdcab991f00ba33c91f49527f8cce595.tar.gz
sssd-44d0fd9bfdcab991f00ba33c91f49527f8cce595.tar.xz
sssd-44d0fd9bfdcab991f00ba33c91f49527f8cce595.zip
sdap: move non async functions from sdap_async_connection.c to sdap_utils.c
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
Diffstat (limited to 'src')
-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;
+}