summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/external/krb5.m415
-rw-r--r--src/krb5_plugin/sssd_krb5_localauth_plugin.c28
-rw-r--r--src/tests/dlopen-tests.c4
3 files changed, 47 insertions, 0 deletions
diff --git a/src/external/krb5.m4 b/src/external/krb5.m4
index 861c8c9fd..90b4a2583 100644
--- a/src/external/krb5.m4
+++ b/src/external/krb5.m4
@@ -96,5 +96,20 @@ AM_CONDITIONAL([BUILD_KRB5_LOCATOR_PLUGIN],
AM_COND_IF([BUILD_KRB5_LOCATOR_PLUGIN],
[AC_DEFINE_UNQUOTED(HAVE_KRB5_LOCATOR_PLUGIN, 1, [Build with krb5 locator plugin])])
+AC_CHECK_HEADER([krb5/localauth_plugin.h],
+ [have_localauth_plugin=yes],
+ [have_localauth_plugin=no]
+ [AC_MSG_NOTICE([Kerberos localauth plugin cannot be built])],
+ [ #ifdef HAVE_KRB5_KRB5_H
+ #include <krb5/krb5.h>
+ #else
+ #include <krb5.h>
+ #endif
+ ])
+AM_CONDITIONAL([BUILD_KRB5_LOCALAUTH_PLUGIN],
+ [test x$have_localauth_plugin = xyes])
+AM_COND_IF([BUILD_KRB5_LOCALAUTH_PLUGIN],
+ [AC_DEFINE_UNQUOTED(HAVE_KRB5_LOCALAUTH_PLUGIN, 1, [Build with krb5 localauth plugin])])
+
CFLAGS=$SAVE_CFLAGS
LIBS=$SAVE_LIBS
diff --git a/src/krb5_plugin/sssd_krb5_localauth_plugin.c b/src/krb5_plugin/sssd_krb5_localauth_plugin.c
new file mode 100644
index 000000000..93fbbc295
--- /dev/null
+++ b/src/krb5_plugin/sssd_krb5_localauth_plugin.c
@@ -0,0 +1,28 @@
+/*
+ Authors:
+ Sumit Bose <sbose@redhat.com>
+
+ Copyright (C) 2014 Red Hat
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include <krb5/localauth_plugin.h>
+
+krb5_error_code
+localauth_sssd_initvt(krb5_context context, int maj_ver, int min_ver,
+ krb5_plugin_vtable vtable)
+{
+ return KRB5_PLUGIN_VER_NOTSUPP;
+}
diff --git a/src/tests/dlopen-tests.c b/src/tests/dlopen-tests.c
index 52d9c02e1..5eb1ed685 100644
--- a/src/tests/dlopen-tests.c
+++ b/src/tests/dlopen-tests.c
@@ -57,6 +57,10 @@ struct so {
{ "sssd_krb5_locator_plugin.so", { LIBPFX"sssd_krb5_locator_plugin.so",
NULL } },
#endif
+#ifdef HAVE_KRB5_LOCALAUTH_PLUGIN
+ { "sssd_krb5_localauth_plugin.so", { LIBPFX"sssd_krb5_localauth_plugin.so",
+ NULL } },
+#endif
#ifdef HAVE_PAC_RESPONDER
{ "sssd_pac_plugin.so", { LIBPFX"sssd_pac_plugin.so", NULL } },
#endif