summaryrefslogtreecommitdiff
path: root/src/libstrongswan/plugins/ldap
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstrongswan/plugins/ldap')
-rw-r--r--src/libstrongswan/plugins/ldap/Makefile.in12
-rw-r--r--src/libstrongswan/plugins/ldap/ldap_fetcher.c32
-rw-r--r--src/libstrongswan/plugins/ldap/ldap_plugin.c21
3 files changed, 13 insertions, 52 deletions
diff --git a/src/libstrongswan/plugins/ldap/Makefile.in b/src/libstrongswan/plugins/ldap/Makefile.in
index 7dd7e92f0..b496ace28 100644
--- a/src/libstrongswan/plugins/ldap/Makefile.in
+++ b/src/libstrongswan/plugins/ldap/Makefile.in
@@ -219,13 +219,7 @@ includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
ipsecdir = @ipsecdir@
-<<<<<<< HEAD
-ipsecgid = @ipsecgid@
ipsecgroup = @ipsecgroup@
-ipsecuid = @ipsecuid@
-=======
-ipsecgroup = @ipsecgroup@
->>>>>>> upstream/4.5.1
ipsecuser = @ipsecuser@
libcharon_plugins = @libcharon_plugins@
libdir = @libdir@
@@ -246,6 +240,8 @@ nm_ca_dir = @nm_ca_dir@
oldincludedir = @oldincludedir@
openac_plugins = @openac_plugins@
p_plugins = @p_plugins@
+pcsclite_CFLAGS = @pcsclite_CFLAGS@
+pcsclite_LIBS = @pcsclite_LIBS@
pdfdir = @pdfdir@
piddir = @piddir@
pki_plugins = @pki_plugins@
@@ -264,14 +260,12 @@ sbindir = @sbindir@
scepclient_plugins = @scepclient_plugins@
scripts_plugins = @scripts_plugins@
sharedstatedir = @sharedstatedir@
-<<<<<<< HEAD
-=======
soup_CFLAGS = @soup_CFLAGS@
soup_LIBS = @soup_LIBS@
->>>>>>> upstream/4.5.1
srcdir = @srcdir@
strongswan_conf = @strongswan_conf@
sysconfdir = @sysconfdir@
+systemdsystemunitdir = @systemdsystemunitdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
diff --git a/src/libstrongswan/plugins/ldap/ldap_fetcher.c b/src/libstrongswan/plugins/ldap/ldap_fetcher.c
index 57c367ca1..fc6114b0a 100644
--- a/src/libstrongswan/plugins/ldap/ldap_fetcher.c
+++ b/src/libstrongswan/plugins/ldap/ldap_fetcher.c
@@ -100,13 +100,8 @@ static bool parse(LDAP *ldap, LDAPMessage *result, chunk_t *response)
}
-<<<<<<< HEAD
-static status_t fetch(private_ldap_fetcher_t *this, char *url,
- chunk_t *result, va_list args)
-=======
METHOD(fetcher_t, fetch, status_t,
- private_ldap_fetcher_t *this, char *url, chunk_t *result)
->>>>>>> upstream/4.5.1
+ private_ldap_fetcher_t *this, char *url, void *userdata)
{
LDAP *ldap;
LDAPURLDesc *lurl;
@@ -115,6 +110,7 @@ METHOD(fetcher_t, fetch, status_t,
int ldap_version = LDAP_VERSION3;
struct timeval timeout;
status_t status = FAILED;
+ chunk_t *result = userdata;
if (!strneq(url, "ldap", 4))
{
@@ -171,15 +167,8 @@ METHOD(fetcher_t, fetch, status_t,
}
-<<<<<<< HEAD
-/**
- * Implementation of fetcher_t.set_option.
- */
-static bool set_option(private_ldap_fetcher_t *this, fetcher_option_t option, ...)
-=======
METHOD(fetcher_t, set_option, bool,
private_ldap_fetcher_t *this, fetcher_option_t option, ...)
->>>>>>> upstream/4.5.1
{
va_list args;
@@ -196,15 +185,8 @@ METHOD(fetcher_t, set_option, bool,
}
}
-<<<<<<< HEAD
-/**
- * Implements ldap_fetcher_t.destroy
- */
-static void destroy(private_ldap_fetcher_t *this)
-=======
METHOD(fetcher_t, destroy, void,
private_ldap_fetcher_t *this)
->>>>>>> upstream/4.5.1
{
free(this);
}
@@ -214,15 +196,6 @@ METHOD(fetcher_t, destroy, void,
*/
ldap_fetcher_t *ldap_fetcher_create()
{
-<<<<<<< HEAD
- private_ldap_fetcher_t *this = malloc_thing(private_ldap_fetcher_t);
-
- this->public.interface.fetch = (status_t(*)(fetcher_t*,char*,chunk_t*))fetch;
- this->public.interface.set_option = (bool(*)(fetcher_t*, fetcher_option_t option, ...))set_option;
- this->public.interface.destroy = (void (*)(fetcher_t*))destroy;
-
- this->timeout = DEFAULT_TIMEOUT;
-=======
private_ldap_fetcher_t *this;
INIT(this,
@@ -235,7 +208,6 @@ ldap_fetcher_t *ldap_fetcher_create()
},
.timeout = DEFAULT_TIMEOUT,
);
->>>>>>> upstream/4.5.1
return &this->public;
}
diff --git a/src/libstrongswan/plugins/ldap/ldap_plugin.c b/src/libstrongswan/plugins/ldap/ldap_plugin.c
index 434a023ce..08d9748ce 100644
--- a/src/libstrongswan/plugins/ldap/ldap_plugin.c
+++ b/src/libstrongswan/plugins/ldap/ldap_plugin.c
@@ -31,15 +31,14 @@ struct private_ldap_plugin_t {
ldap_plugin_t public;
};
-<<<<<<< HEAD
-/**
- * Implementation of ldap_plugin_t.destroy
- */
-static void destroy(private_ldap_plugin_t *this)
-=======
+METHOD(plugin_t, get_name, char*,
+ private_ldap_plugin_t *this)
+{
+ return "ldap";
+}
+
METHOD(plugin_t, destroy, void,
private_ldap_plugin_t *this)
->>>>>>> upstream/4.5.1
{
lib->fetcher->remove_fetcher(lib->fetcher,
(fetcher_constructor_t)ldap_fetcher_create);
@@ -51,21 +50,17 @@ METHOD(plugin_t, destroy, void,
*/
plugin_t *ldap_plugin_create()
{
-<<<<<<< HEAD
- private_ldap_plugin_t *this = malloc_thing(private_ldap_plugin_t);
-
- this->public.plugin.destroy = (void(*)(plugin_t*))destroy;
-=======
private_ldap_plugin_t *this;
INIT(this,
.public = {
.plugin = {
+ .get_name = _get_name,
+ .reload = (void*)return_false,
.destroy = _destroy,
},
},
);
->>>>>>> upstream/4.5.1
lib->fetcher->add_fetcher(lib->fetcher,
(fetcher_constructor_t)ldap_fetcher_create, "ldap://");