Skip to content

Commit

Permalink
Use correct prefix for share/pam-configs
Browse files Browse the repository at this point in the history
Respect the configured install prefix.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Arvind Sankar <nivedita@alum.mit.edu>
Signed-off-by: Ryan Moeller <ryan@iXsystems.com>
Closes #10604
  • Loading branch information
Ryan Moeller committed Jul 30, 2020
1 parent 3a92552 commit 2f571db
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
7 changes: 4 additions & 3 deletions config/user-pam.m4
Expand Up @@ -12,8 +12,9 @@ AC_DEFUN([ZFS_AC_CONFIG_USER_PAM], [
AC_ARG_WITH(pamconfigsdir,
AS_HELP_STRING([--with-pamconfigsdir=DIR],
[install pam-config files in dir [[/usr/share/pamconfigs]]]),
[pamconfigsdir="$withval"],[pamconfigsdir=/usr/share/pam-configs])
[install pam-config files in dir [DATADIR/pam-configs]]),
[pamconfigsdir="$withval"],
[pamconfigsdir='${datadir}/pam-configs'])
AS_IF([test "x$enable_pam" != "xno"], [
AC_CHECK_HEADERS([security/pam_modules.h], [
Expand All @@ -29,7 +30,7 @@ AC_DEFUN([ZFS_AC_CONFIG_USER_PAM], [
])
])
AS_IF([test "x$enable_pam" = "xyes"], [
DEFINE_PAM='--with "pam" --define "_pamconfigsdir $(pamconfigsdir)"'
DEFINE_PAM='--with pam'
])
AC_SUBST(DEFINE_PAM)
AC_SUBST(pammoduledir)
Expand Down
6 changes: 4 additions & 2 deletions rpm/generic/zfs.spec.in
Expand Up @@ -348,14 +348,16 @@ image which is ZFS aware.
--with-udevdir=%{_udevdir} \
--with-udevruledir=%{_udevruledir} \
--with-dracutdir=%{_dracutdir} \
--with-pamconfigsdir=%{_datadir}/pam-configs \
--with-pammoduledir=%{_libdir}/security \
--with-python=%{__python} \
--with-pkgconfigdir=%{_pkgconfigdir} \
--disable-static \
%{debug} \
%{debuginfo} \
%{asan} \
%{systemd} \
--with-pammoduledir=%{_libdir}/security %{pam} \
%{pam} \
%{pyzfs}
make %{?_smp_mflags}

Expand Down Expand Up @@ -472,7 +474,7 @@ systemctl --system daemon-reload >/dev/null || true
%attr(440, root, root) %config(noreplace) %{_sysconfdir}/sudoers.d/*
%if %{with pam}
%{_libdir}/security/*
%{_pamconfigsdir}/*
%{_datadir}/pam-configs/*
%endif

%files -n libzpool2
Expand Down

0 comments on commit 2f571db

Please sign in to comment.