diff --git a/baselibs.conf b/baselibs.conf index 6d70477..d16b166 100644 --- a/baselibs.conf +++ b/baselibs.conf @@ -1 +1,3 @@ libcap2 +pam_cap + supplements "packageand(pam_cap:pam-)" diff --git a/libcap.changes b/libcap.changes index 9a4e845..21a7c5c 100644 --- a/libcap.changes +++ b/libcap.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Jan 31 17:52:31 UTC 2017 - matwey.kornilov@gmail.com + +- Enable PAM pam_cap.so module + ------------------------------------------------------------------- Sun Jan 1 12:44:21 UTC 2017 - jengelh@inai.de diff --git a/libcap.spec b/libcap.spec index 91f4a63..5ac12c4 100644 --- a/libcap.spec +++ b/libcap.spec @@ -26,6 +26,7 @@ Source: https://www.kernel.org/pub/linux/libs/security/linux-privs/libca Source2: baselibs.conf Url: https://sites.google.com/site/fullycapable/ BuildRequires: fdupes +BuildRequires: pam-devel BuildRequires: pkg-config %description @@ -74,6 +75,13 @@ Group: System/Filesystems This package contains utility programs handling capabilities via libcap. +%package -n pam_cap +Summary: PAM Module for Capabilities Support +Group: System/Libraries + +%description -n pam_cap +A PAM module for per-session capabilities manipulation. + %prep %setup -q %build @@ -91,6 +99,11 @@ make install RAISE_SETFCAP=no \ find %{buildroot} -type f -name '*.la' -print -delete # do not provide static libs rm %{buildroot}%{_libdir}/libcap.a + +mkdir -p %{buildroot}/%{_lib}/security +mv %{buildroot}%{_libdir}/security/pam_cap.so %{buildroot}/%{_lib}/security/pam_cap.so +install -D pam_cap/capability.conf %{buildroot}%{_sysconfdir}/security/capability.conf + %fdupes -s $RPM_BUILD_ROOT %post -n libcap2 -p /sbin/ldconfig @@ -116,4 +129,9 @@ rm %{buildroot}%{_libdir}/libcap.a %{_libdir}/pkgconfig/%{name}.pc %{_mandir}/man3/* +%files -n pam_cap +%defattr(-,root,root) +%config(noreplace) %attr(0600,root,root) %{_sysconfdir}/security/capability.conf +/%{_lib}/security/pam_cap.so + %changelog