Package: tmpreaper
Version: 1.6.6
Severity: normal
Tags: patch
Hi,
If the command line options --force and --ctime are both specified, the
message "error: --ctime conflicts with --mtime option" is displayed and
tmpreaper exits.
The problem is the line (in the code for parsing the --ctime option)
if (flags & FLAGS_MTIME == FLAGS_MTIME)
which is equivalent to
if (flags & (FLAGS_MTIME == FLAGS_MTIME))
which is equivalent to
if (flags & 1)
which is equivalent to
if (flags & FLAGS_FORCE)
so it doesn't check if the FLAGS_MTIME bit is set in flags, but if the
FLAGS_FORCE bit is set.
The same applies to the combination of --force and --mtime.
I propose the following patch:
--- tmpreaper-1.6.6/tmpreaper.c~ 2006-02-03 10:26:26.000000000 +0100
+++ tmpreaper-1.6.6/tmpreaper.c 2006-02-18 21:24:47.000000000 +0100
@@ -751,7 +751,7 @@
break;
case 'c':
- if (flags & FLAGS_MTIME == FLAGS_MTIME) {
+ if ((flags & FLAGS_MTIME) == FLAGS_MTIME) {
message(LOG_FATAL, "--ctime conflicts with --mtime option\n");
/*NOTREACHED*/
}
@@ -759,7 +759,7 @@
break;
case 'm':
- if (flags & FLAGS_CTIME == FLAGS_CTIME) {
+ if ((flags & FLAGS_CTIME) == FLAGS_CTIME) {
message(LOG_FATAL, "--mtime conflicts with --ctime option\n");
/*NOTREACHED*/
}
Cheers,
Martin
-- System Information:
Debian Release: testing/unstable
APT prefers testing
APT policy: (500, 'testing'), (200, 'unstable')
Architecture: amd64 (x86_64)
Shell: /bin/sh linked to /bin/dash
Kernel: Linux 2.6.15-1-amd64-k8
Locale: LANG=C, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Versions of packages tmpreaper depends on:
ii debconf [debconf-2.0] 1.4.70 Debian configuration management sy
ii libc6 2.3.5-13 GNU C Library: Shared libraries an
tmpreaper recommends no packages.
-- debconf information excluded
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]