summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/providers/ipa/ipa_common.c6
-rw-r--r--src/util/sss_ldap.c8
-rw-r--r--src/util/sss_ldap.h3
-rw-r--r--src/util/util.c8
-rw-r--r--src/util/util.h3
5 files changed, 14 insertions, 14 deletions
diff --git a/src/providers/ipa/ipa_common.c b/src/providers/ipa/ipa_common.c
index 9fbf9baa8..6301355df 100644
--- a/src/providers/ipa/ipa_common.c
+++ b/src/providers/ipa/ipa_common.c
@@ -639,9 +639,9 @@ static void ipa_resolve_callback(void *private_data, struct fo_server *server)
return;
}
- safe_address = sss_ldap_escape_ip_address(tmp_ctx,
- srvaddr->family,
- address);
+ safe_address = sss_escape_ip_address(tmp_ctx,
+ srvaddr->family,
+ address);
if (safe_address == NULL) {
DEBUG(1, ("sss_ldap_escape_ip_address failed.\n"));
talloc_free(tmp_ctx);
diff --git a/src/util/sss_ldap.c b/src/util/sss_ldap.c
index 1394b4d6c..601885b41 100644
--- a/src/util/sss_ldap.c
+++ b/src/util/sss_ldap.c
@@ -18,7 +18,6 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <stdlib.h>
-#include <netdb.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/socket.h>
@@ -93,13 +92,6 @@ int sss_ldap_control_create(const char *oid, int iscritical,
#endif
}
-inline const char *
-sss_ldap_escape_ip_address(TALLOC_CTX *mem_ctx, int family, const char *addr)
-{
- return family == AF_INET6 ? talloc_asprintf(mem_ctx, "[%s]", addr) :
- talloc_strdup(mem_ctx, addr);
-}
-
#ifdef HAVE_LDAP_INIT_FD
struct sdap_async_sys_connect_state {
long old_flags;
diff --git a/src/util/sss_ldap.h b/src/util/sss_ldap.h
index 14fff29e7..ab890293c 100644
--- a/src/util/sss_ldap.h
+++ b/src/util/sss_ldap.h
@@ -49,9 +49,6 @@ int sss_ldap_control_create(const char *oid, int iscritical,
struct berval *value, int dupval,
LDAPControl **ctrlp);
-inline const char *
-sss_ldap_escape_ip_address(TALLOC_CTX *mem_ctx, int family, const char *addr);
-
struct tevent_req *sss_ldap_init_send(TALLOC_CTX *mem_ctx,
struct tevent_context *ev,
const char *uri,
diff --git a/src/util/util.c b/src/util/util.c
index 6c4a6033d..649d58ea6 100644
--- a/src/util/util.c
+++ b/src/util/util.c
@@ -19,6 +19,7 @@
*/
#include <ctype.h>
+#include <netdb.h>
#include "talloc.h"
#include "util/util.h"
@@ -589,3 +590,10 @@ errno_t sss_filter_sanitize(TALLOC_CTX *mem_ctx,
return EOK;
}
+
+char *
+sss_escape_ip_address(TALLOC_CTX *mem_ctx, int family, const char *addr)
+{
+ return family == AF_INET6 ? talloc_asprintf(mem_ctx, "[%s]", addr) :
+ talloc_strdup(mem_ctx, addr);
+}
diff --git a/src/util/util.h b/src/util/util.h
index 4b6f3b78a..a59603d04 100644
--- a/src/util/util.h
+++ b/src/util/util.h
@@ -405,4 +405,7 @@ errno_t sss_filter_sanitize(TALLOC_CTX *mem_ctx,
const char *input,
char **sanitized);
+char *
+sss_escape_ip_address(TALLOC_CTX *mem_ctx, int family, const char *addr);
+
#endif /* __SSSD_UTIL_H__ */