diff options
author | Patrick Venture <venture@google.com> | 2018-12-03 12:22:50 -0800 |
---|---|---|
committer | Patrick Venture <venture@google.com> | 2018-12-11 16:39:50 +0000 |
commit | 15bc9183c9c04d60a8f65db14dd19194d25e8c25 (patch) | |
tree | 32b689802e2ac82028baaa90e9577b8aa2a6a027 | |
parent | 12ca691136435876bf6e06685512c35b6d98c0b1 (diff) | |
download | phosphor-host-ipmid-15bc9183c9c04d60a8f65db14dd19194d25e8c25.tar.gz phosphor-host-ipmid-15bc9183c9c04d60a8f65db14dd19194d25e8c25.zip |
build: fix pam library inclusion and usage
The pam_misc was deliberately included by the
Makefile_am, however, no calls into pam_ were made
from libuserlayer. Pam calls were made from
usercommand.cpp, in libipmi20.so. The calls are
part of the primary pam library.
Before:
objdump -t phosphor-host-ipmid/.libs/libipmi20.so\
|grep "UND"|grep -v "@@"|grep "pam"
0000000000000000 *UND* 0000000000000000 pam_end
0000000000000000 *UND* 0000000000000000 pam_chauthtok
0000000000000000 *UND* 0000000000000000 pam_start
Now:
objdump -t ./.libs/libipmi20.so|grep "UND"|grep pam
0000000000000000 F *UND* 0000000000000000 pam_chauthtok@@LIBPAM_1.0
0000000000000000 F *UND* 0000000000000000 pam_end@@LIBPAM_1.0
0000000000000000 F *UND* 0000000000000000 pam_start@@LIBPAM_1.0
Tested: Searched objects for undefined pam calls
and found the information above.
Change-Id: I44aa570a2087affafba09886fbf17fa9d99abe05
Signed-off-by: Patrick Venture <venture@google.com>
-rw-r--r-- | Makefile.am | 2 | ||||
-rw-r--r-- | configure.ac | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/Makefile.am b/Makefile.am index c3535ba..e053550 100644 --- a/Makefile.am +++ b/Makefile.am @@ -78,7 +78,6 @@ libuserlayer_la_LDFLAGS = \ $(PHOSPHOR_DBUS_INTERFACES_LIBS) \ -lstdc++fs \ $(CRYPTO_LIBS) \ - -lpam_misc \ -version-info 0:0:0 -shared libuserlayer_la_CXXFLAGS = \ $(SYSTEMD_CFLAGS) \ @@ -126,6 +125,7 @@ libipmi20_la_LDFLAGS = \ $(libmapper_LIBS) \ $(PHOSPHOR_LOGGING_LIBS) \ $(PHOSPHOR_DBUS_INTERFACES_LIBS) \ + $(LIBS) \ -lstdc++fs \ -luserlayer \ -version-info 0:0:0 -shared diff --git a/configure.ac b/configure.ac index a4f407f..95d9ba8 100644 --- a/configure.ac +++ b/configure.ac @@ -23,6 +23,7 @@ AS_IF([test "x$enable_softoff" != "xno"], ) # Checks for libraries. +AC_CHECK_LIB([pam], [pam_start], [], [AC_MSG_ERROR([libpam not found])]) AC_CHECK_LIB([mapper], [mapper_get_service], ,[AC_MSG_ERROR([Could not find libmapper...openbmc/phosphor-objmgr package required])]) PKG_CHECK_MODULES([SYSTEMD], [libsystemd >= 221], [], [AC_MSG_ERROR(["systemd required and not found"])]) PKG_CHECK_MODULES([CRYPTO], [libcrypto >= 1.0.2g], ,[AC_MSG_ERROR([can't find openssl libcrypto])]) |