[Logcheck-commits] CVS logcheck/src
CVS User ttroxell
logcheck-devel@lists.alioth.debian.org
Tue, 19 Apr 2005 02:58:41 +0000
Update of /cvsroot/logcheck/logcheck/src
In directory haydn:/tmp/cvs-serv26634/src
Modified Files:
logcheck
Log Message:
Fix lockfile potential DoS condition
Make debug messages consistent
Add note about inconsistent permissions (see #302379)
--- /cvsroot/logcheck/logcheck/src/logcheck 2005/04/04 09:50:45 1.111
+++ /cvsroot/logcheck/logcheck/src/logcheck 2005/04/19 02:58:41 1.112
@@ -22,7 +22,7 @@
# along with Logcheck; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-# $Id: logcheck,v 1.111 2005/04/04 09:50:45 maks-guest Exp $
+# $Id: logcheck,v 1.112 2005/04/19 02:58:41 ttroxell Exp $
if [ $UID == 0 ]; then
echo "logcheck should not be run as root. Use su to invoke logcheck:"
@@ -81,7 +81,7 @@
SORTUNIQ=0
SUPPORT_CRACKING_IGNORE=0
SYSLOGSUMMARY=0
-LOCKFILE="/var/lock/logcheck"
+LOCKFILE="/var/lock/logcheck/logcheck"
# Carry out the clean up tasks
cleanup() {
@@ -91,8 +91,8 @@
kill $LOCK && unset LOCK
fi
- if [ -f "$LOCKFILE.lock" ]; then
- debug "cleanup: Removing lockfile: $LOCKFILE.lock"
+ if [ -f "$LOCKFILE" ]; then
+ debug "cleanup: Removing lockfile: $LOCKFILE"
lockfile-remove $LOCKFILE
fi
@@ -139,8 +139,8 @@
kill $LOCK && unset LOCK
fi
- if [ -f "$LOCKFILE.lock" ]; then
- debug "error: Removing lockfile: $LOCKFILE.lock"
+ if [ -f "$LOCKFILE" ]; then
+ debug "error: Removing lockfile: $LOCKFILE"
lockfile-remove $LOCKFILE
fi
@@ -591,14 +591,14 @@
trap 'cleanup' 0
-debug "Trying to get lockfile: $LOCKFILE.lock"
+debug "Trying to get lockfile: $LOCKFILE"
lockfile-create --retry 1 $LOCKFILE > /dev/null 2>&1
[10 lines skipped]