sudo: Add ldap support for sudoers rules
authorChris Frederick <cdf123@cdf123.net>
Mon, 24 Oct 2016 15:34:23 +0000 (10:34 -0500)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Mon, 6 Feb 2017 18:40:40 +0000 (19:40 +0100)
Automatically build sudo with ldap support when openldap is enabled.

When sudo is built with ldap, /etc/sudoers is only read in for defaults,
all rules need to be provided via ldap which is configured by the user
in /etc/ldap.conf.

Signed-off-by: Chris Frederick <cdf123@cdf123.net>
Reviewed-by: Romain Naour <romain.naour@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/sudo/sudo.mk

index 12b16e04e3cc954b5ce87cf4e85d4352cd5cf6b3..b1a6dd35fcd446d163960cc57e456a33989ee668 100644 (file)
@@ -37,6 +37,13 @@ else
 SUDO_CONF_OPTS += --disable-zlib
 endif
 
+ifeq ($(BR2_PACKAGE_OPENLDAP),y)
+SUDO_DEPENDENCIES += openldap
+SUDO_CONF_OPTS += --with-ldap
+else
+SUDO_CONF_OPTS += --without-ldap
+endif
+
 # mksigname/mksiglist needs to run on build host to generate source files
 define SUDO_BUILD_MKSIGNAME_MKSIGLIST_HOST
        $(MAKE) $(HOST_CONFIGURE_OPTS) \