From 04b9b1397f57f3331396c0c73f8a6a971eeaff07 Mon Sep 17 00:00:00 2001 From: "Ralf S. Engelschall" Date: Tue, 12 Mar 2002 09:03:59 +0000 Subject: [PATCH] more complete PAM support --- sudo/sudo.spec | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/sudo/sudo.spec b/sudo/sudo.spec index 4b4e500903..9c3baa4bbb 100644 --- a/sudo/sudo.spec +++ b/sudo/sudo.spec @@ -24,7 +24,9 @@ ## # package options +%ifndef with_pam %define with_pam yes +%endif # package information Name: sudo @@ -36,7 +38,7 @@ Distribution: OpenPKG [REL] Group: System License: BSD Version: 1.6.5p2 -Release: 20020311 +Release: 20020312 # list of sources Source0: ftp://ftp.courtesan.com/pub/sudo/sudo-%{version}.tar.gz @@ -58,6 +60,8 @@ AutoReqProv: no users (or groups of users) the ability to run some (or all) commands as root or another user while logging the commands and arguments. + Options: with_pam=%{with_pam} + %prep %setup -q @@ -115,3 +119,15 @@ AutoReqProv: no %clean rm -rf $RPM_BUILD_ROOT +%post +%if "%{with_pam}" == "yes" + # add PAM configuration entry + $RPM_INSTALL_PREFIX/sbin/pamtool -a -s -n "sudo" +%endif + +%preun +%if "%{with_pam}" == "yes" + # remove PAM configuration entry + $RPM_INSTALL_PREFIX/sbin/pamtool -r -s -n "sudo" +%endif +