summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Bokovoy <abokovoy@redhat.com>2017-10-25 11:38:55 +0300
committerAlexander Bokovoy <abokovoy@redhat.com>2017-11-01 10:43:23 +0200
commit6c4e8869ba6121ddbc6e1eca880c39b0af3391e0 (patch)
treeddcc552ccdf3b45bdd9a5c2a973bfeda1703bd08
parent5f0449ca1a074df08aa360ad10530c205a0e487a (diff)
downloadslapi-nis-6c4e8869ba6121ddbc6e1eca880c39b0af3391e0.tar.gz
slapi-nis-6c4e8869ba6121ddbc6e1eca880c39b0af3391e0.tar.xz
slapi-nis-6c4e8869ba6121ddbc6e1eca880c39b0af3391e0.zip
configure.ac: detect extended NSS API provided by SSSD
SSSD exposes an extended NSS API via libsss_nss_idmap. This API allows to query getpwnam()/getgrnam()/getgruid()/getpwuid()/getgrouplist() information with a timeout per request. As result, an application has possibility to cancel too long request. This API also allows to ignore SSSD cache or invalidate it when requesting certain information. slapi-nis needs this functionality when invalidating own entries as result of changes done by other LDAP clients in the areas which slapi-nis doesn't track directly. For example, an update of ID override in the Default Trust View should invalidate user or group entry for that AD object. Since retrieval of the user/group information relies on SSSD, SSSD needs to be notified that there is a change in ID override and evict the entry from its cache as well.
-rw-r--r--configure.ac6
1 files changed, 6 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index f82a47e..a958607 100644
--- a/configure.ac
+++ b/configure.ac
@@ -361,8 +361,13 @@ if test "x$use_nsswitch" != xno ; then
SSS_NSS_IDMAP_LIBS=
fi
fi
+
AC_SUBST(SSS_NSS_IDMAP_CFLAGS)
AC_SUBST(SSS_NSS_IDMAP_LIBS)
+ AC_CHECK_LIB(sss_nss_idmap,sss_nss_getpwnam_timeout)
+ if test "x$ac_cv_lib_sss_nss_idmap_sss_nss_getpwnam_timeout" = xyes ; then
+ AC_DEFINE(USE_SSS_NSS_TIMEOUT,1,[Use extended NSS API provided by SSSD])
+ fi
if test "x$use_pam" != xno ; then
AC_CHECK_HEADERS(security/pam_appl.h)
@@ -384,6 +389,7 @@ if test "x$use_nsswitch" != xno ; then
fi
AC_DEFINE(USE_NSSWITCH,1,[Use nsswitch API to lookup users and groups not found in the LDAP tree])
fi
+AM_CONDITIONAL([USE_SSS_NSS_TIMEOUT], [test "x$ac_cv_lib_sss_nss_idmap_sss_nss_getpwnam_timeout" = xyes])
use_idviews=true
AC_ARG_WITH(idviews,