]> code.ossystems Code Review - openembedded-core.git/commitdiff
shadow: Fix build when DISTRO_FEATURES contains pam, libc-crypt
authorRichard Tollerton <rich.tollerton@ni.com>
Wed, 31 Jul 2013 18:33:10 +0000 (13:33 -0500)
committerSaul Wold <sgw@linux.intel.com>
Fri, 2 Aug 2013 15:01:39 +0000 (08:01 -0700)
shadow falsely assumes that if --enable-libpam is set, it doesn't need to link
against libcrypt; this breaks chsh. (This same fix exists in Arch.)

Signed-off-by: Richard Tollerton <rich.tollerton@ni.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
meta/recipes-extended/shadow/shadow_4.1.4.3.bb

index 173da3b0f01bf034200c2b48bc8f0104ed6515fe..af67339d992b82eb8c3d4ebc91e102bb7b0a34b8 100644 (file)
@@ -37,6 +37,10 @@ EXTRA_OECONF += "--without-audit \
                  --without-selinux"
 EXTRA_OECONF_libc-uclibc += "--with-nscd=no"
 
+# Build falsely assumes that if --enable-libpam is set, we don't need to link against
+# libcrypt. This breaks chsh.
+BUILD_LDFLAGS += "${@base_contains('DISTRO_FEATURES', 'pam', base_contains('DISTRO_FEATURES', 'libc-crypt',  '-lcrypt', '', d), '', d)}"
+
 PAM_PLUGINS = "libpam-runtime \
                pam-plugin-faildelay \
                pam-plugin-securetty \