Package: cron Version: 3.0pl1-100 Severity: normal Tags: patch In edit_cmd() (in crontab.c) the tmp-file got reopend after editing by open_tmp_crontab() but does not get closed again before cleanup_tmp_crontab() is called. This is no problem on most systems but with nfs-root (and therefor /tmp on nfs also) the still open tmp file got renamed to .nfs???? on unlink. So the rmdir call on the tmp-dir fails and produces an error message. Also on program exit the empty dir is left back in /tmp.
-- System Information: Debian Release: 4.0 APT prefers testing-proposed-updates APT policy: (960, 'testing-proposed-updates'), (960, 'testing'), (510, 'unstable'), (500, 'stable'), (1, 'experimental') Architecture: i386 (i686) Shell: /bin/sh linked to /bin/bash Kernel: Linux 2.6.19-mars Locale: [EMAIL PROTECTED], [EMAIL PROTECTED] (charmap=ISO-8859-15) Versions of packages cron depends on: ii adduser 3.102 Add and remove users and groups ii debianutils 2.17 Miscellaneous utilities specific t ii libc6 2.5-0exp3 GNU C Library: Shared libraries ii libpam0g 0.79-4 Pluggable Authentication Modules l ii libselinux1 1.32-3 SELinux shared libraries ii lsb-base 3.1-23 Linux Standard Base 3.1 init scrip Versions of packages cron recommends: ii exim4 4.63-17 metapackage to ease exim MTA (v4) ii exim4-daemon-light [mail-tran 4.63-17 lightweight exim MTA (v4) daemon -- debconf information excluded
diff -pruN cron-3.0pl1.orig/crontab.c cron-3.0pl1/crontab.c --- cron-3.0pl1.orig/crontab.c 2007-03-08 09:15:56.000000000 +0100 +++ cron-3.0pl1/crontab.c 2007-03-08 09:30:24.000000000 +0100 @@ -713,6 +713,10 @@ again: /* Loop point for retrying edit a goto fatal; } + if (fclose(NewCrontab) != 0) { + perror(Filename); + } + remove: cleanup_tmp_crontab(); done: