Bardzo proszę wprowadzić załączony patch do repo.
Wprowadza kontrolę omyłkowego i destrukcyjnego uruchomienia
webalizer.cron z poziomu root'a.
Ewentualnie FORCE_USER=... mógłby być domyślnie zakomentowany, ale
myślę, że bez komentarza jest lepiej.
-- 
Przemysław Sztoch <przemyslaw{aT}sztoch.pl>
Mobile +48 (502) 400 239, GG 569973, Jabber psztoch{aT}finn.pl
--- /usr/sbin/webalizer.cron.orig       2007-05-19 14:42:41.000000000 +0200
+++ /usr/sbin/webalizer.cron    2007-05-19 22:24:33.000000000 +0200
@@ -4,6 +4,13 @@
 [ -f /etc/sysconfig/webalizer ] && . /etc/sysconfig/webalizer
 umask 0022
 
+if [ -n "$FORCE_USER" ]; then
+       if [ "$FORCE_USER" != "`id -un`" ]; then
+               echo "Wrong current user. $FORCE_USER is required!"
+               exit 1
+       fi
+fi
+
 if [ -n "$ENABLE" ] && [ "$ENABLE" = "yes" -o "$ENABLE" = "YES" ]; then
        LC_ALL=$LANG
        export LANG
@@ -16,11 +23,12 @@
        fi
        
        if [ -f /etc/webalizer.conf ]; then
-               webalizer ${WEBALIZER_OPTS} -c /etc/webalizer.conf
+               webalizer ${WEBALIZER_OPTS} -c /etc/webalizer.conf || echo 
"webalizer -c /etc/webalizer.conf - unsuccesful!"
+
        fi
        if [ -n "$MULTIPLE" ] && [ "$MULTIPLE" = "yes" -o "$MULTIPLE" = "YES" 
]; then
                for i in $(ls /etc/webalizer/*.conf 2>/dev/null); do
-                       webalizer ${WEBALIZER_OPTS} -c $i;
+                       webalizer ${WEBALIZER_OPTS} -c $i || echo "webalizer -c 
$i - unsuccesful!"
                done
        fi
 fi
--- /etc/sysconfig/webalizer.orig       2007-05-19 22:28:42.000000000 +0200
+++ /etc/sysconfig/webalizer    2007-05-19 14:53:47.000000000 +0200
@@ -14,3 +14,5 @@
 
 # Don't display any messages
 #REALLY_QUIET="yes"
+
+FORCE_USER="stats"
_______________________________________________
pld-devel-pl mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-devel-pl

Odpowiedź listem elektroniczym