[v2] package/openvpn: enable pam plugin support
diff mbox series

Message ID 20191030005604.81615-1-aduskett@gmail.com
State New
Headers show
Series
  • [v2] package/openvpn: enable pam plugin support
Related show

Commit Message

Adam Duskett Oct. 30, 2019, 12:56 a.m. UTC
From: Adam Duskett <Aduskett@gmail.com>

If the linux-pam package is selected, add the package to the
dependency list and explicitly set --enable-plugin-auth-pam.

Signed-off-by: Adam Duskett <Aduskett@gmail.com>
---
Changes v1 -> v2:
  - Changed from an explicit option to an automatic one. (Arnout)
  - Updated commit message to reflect the above.
  - Switched tabs for spaces. (Arnout)

 package/openvpn/openvpn.mk | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

Patch
diff mbox series

diff --git a/package/openvpn/openvpn.mk b/package/openvpn/openvpn.mk
index 277b072deb..8ee9c1a4b4 100644
--- a/package/openvpn/openvpn.mk
+++ b/package/openvpn/openvpn.mk
@@ -11,7 +11,6 @@  OPENVPN_DEPENDENCIES = host-pkgconf openssl
 OPENVPN_LICENSE = GPL-2.0
 OPENVPN_LICENSE_FILES = COPYRIGHT.GPL
 OPENVPN_CONF_OPTS = \
-	--disable-plugin-auth-pam \
 	--enable-iproute2 \
 	--with-crypto-library=openssl \
 	$(if $(BR2_STATIC_LIBS),--disable-plugins)
@@ -45,6 +44,13 @@  else
 OPENVPN_CONF_OPTS += --disable-selinux
 endif
 
+ifeq ($(BR2_PACKAGE_LINUX_PAM),y)
+OPENVPN_DEPENDENCIES += linux-pam
+OPENVPN_CONF_OPTS += --enable-plugin-auth-pam
+else
+OPENVPN_CONF_OPTS += --disable-plugin-auth-pam
+endif
+
 ifeq ($(BR2_PACKAGE_SYSTEMD),y)
 OPENVPN_DEPENDENCIES += systemd
 OPENVPN_CONF_OPTS += --enable-systemd