[packages/cronie] - add support for recording user's login uid to the process attribute

zawadaa zawadaa at pld-linux.org
Tue May 14 17:09:50 CEST 2013


commit 5b4e8f01f2a49b402dfbcbabaccb4b32e508f96c
Author: Andrzej Zawadzki <zawadaa at pld-linux.org>
Date:   Tue May 14 17:09:21 2013 +0200

    - add support for recording user's login uid to the process attribute

 cronie.pam  |  1 +
 cronie.spec | 11 +++++++++--
 2 files changed, 10 insertions(+), 2 deletions(-)
---
diff --git a/cronie.spec b/cronie.spec
index c6afba9..0807617 100644
--- a/cronie.spec
+++ b/cronie.spec
@@ -17,7 +17,7 @@
 Summary:	Cron daemon for executing programs at set times
 Name:		cronie
 Version:	1.4.9
-Release:	1
+Release:	2
 License:	MIT and BSD and GPL v2
 Group:		Daemons
 Source0:	https://fedorahosted.org/releases/c/r/cronie/%{name}-%{version}.tar.gz
@@ -133,12 +133,19 @@ install -d $RPM_BUILD_ROOT{/var/{log,spool/{ana,}cron},%{_mandir},%{systemdunitd
 	pamdir=/etc/pam.d \
 	DESTDIR=$RPM_BUILD_ROOT
 
+cp -p %{SOURCE5} crond.pam
+
+%if %{without audit}
+# remove recording user's login uid to the process attribute
+%{__sed} -i -e '/pam_loginuid.so/d' crond.pam
+%endif
+
 install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/crond
 cp -a contrib/0anacron $RPM_BUILD_ROOT/etc/cron.hourly/0anacron
 cp -a %{SOURCE2} $RPM_BUILD_ROOT/etc/logrotate.d/cron
 cp -a %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/cron
 cp -a %{SOURCE4} $RPM_BUILD_ROOT/etc/cron.d/crontab
-cp -a %{SOURCE5} $RPM_BUILD_ROOT/etc/pam.d/crond
+cp -a crond.pam  $RPM_BUILD_ROOT/etc/pam.d/crond
 cp -a %{SOURCE6} $RPM_BUILD_ROOT/etc/init/crond.conf
 cp -a %{SOURCE7} $RPM_BUILD_ROOT%{systemdunitdir}/crond.service
 
diff --git a/cronie.pam b/cronie.pam
index ab053c5..9f8d098 100644
--- a/cronie.pam
+++ b/cronie.pam
@@ -2,3 +2,4 @@
 auth		include		system-auth
 account		include		system-auth
 session		include		system-auth
+session		required	pam_loginuid.so
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/cronie.git/commitdiff/5b4e8f01f2a49b402dfbcbabaccb4b32e508f96c



More information about the pld-cvs-commit mailing list