From b0010b211be8c0140ae5b03d73d174c2bea969218cf058d361b19df5191f3702 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cristian=20Rodr=C3=ADguez?= Date: Thu, 18 Nov 2010 12:49:58 +0000 Subject: [PATCH] Accepting request 53326 from home:lnussel:fscaps OBS-URL: https://build.opensuse.org/request/show/53326 OBS-URL: https://build.opensuse.org/package/show/Base:System/aaa_base?expand=0&rev=169 --- aaa_base-rpmlintrc | 2 +- aaa_base.changes | 5 +++++ aaa_base.post | 38 +++++++++++++------------------------- aaa_base.spec | 8 +++++++- aaa_base.tar.bz2 | 4 ++-- 5 files changed, 28 insertions(+), 29 deletions(-) diff --git a/aaa_base-rpmlintrc b/aaa_base-rpmlintrc index 82ec4d5..a3d54d0 100644 --- a/aaa_base-rpmlintrc +++ b/aaa_base-rpmlintrc @@ -23,7 +23,7 @@ addFilter("hidden-file-or-dir.*/root/.exrc") # perhaps should be configurable later... addFilter("non-etc-or-var-file-marked-as-conffile.*/sbin/quick_halt") # confirmed - but standard -addFilter("non-root-group-log-file.*/var/log/lastlog.*tty") +addFilter("non-root-group-log-file /var/log/wtmp utmp") # the following init script don't need to be reloaded - # even after an update addFilter("no-reload-entry.*/etc/init.d/README") diff --git a/aaa_base.changes b/aaa_base.changes index 1be8861..873120b 100644 --- a/aaa_base.changes +++ b/aaa_base.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Nov 18 10:26:44 UTC 2010 - lnussel@suse.de + +- own /var/log/wtmp, /var/run/utmp, /var/log/faillog and /var/log/btmp + ------------------------------------------------------------------- Wed Nov 17 15:55:09 CET 2010 - ro@suse.de diff --git a/aaa_base.post b/aaa_base.post index 551ebc2..b7fddf1 100644 --- a/aaa_base.post +++ b/aaa_base.post @@ -148,31 +148,19 @@ touch /etc/mtab if test ! -d /var/log ; then mkdir -p /var/log fi -if test ! -e /var/log/faillog ; then - touch /var/log/faillog - chmod 600 /var/log/faillog - chown root:root /var/log/faillog -fi -if test ! -e /root/.bash_history ; then - touch /root/.bash_history - chmod 600 /root/.bash_history -fi -if test ! -e /var/log/lastlog ; then - touch /var/log/lastlog - chmod 644 /var/log/lastlog - chown root:utmp /var/log/lastlog -fi -if test ! -e /var/log/wtmp ; then - touch /var/log/wtmp - chmod 664 /var/log/wtmp - chown root:utmp /var/log/wtmp -fi -# The group ownership of the following files has changed for openSUSE 11.4 -# update it: -chgrp utmp /var/log/wtmp /var/log/lastlog -if test -e /var/run/utmp ; then - chgrp utmp /var/run/utmp -fi + +while read file owner mode; do + test -e "$file" || touch "$file" + chmod "$mode" "$file" + chown "$owner" "$file" +done <