Here is a patch to fix this bug. I've also included a patch to quiet a
spurious warning about FILE *mail.
I think it would be good if this could be included for Lenny.
diff -ru /tmp/cron-3.0pl1/do_command.c /home/rjc/cron-3.0pl1/do_command.c
--- /tmp/cron-3.0pl1/do_command.c 2008-09-19 21:33:09.000000000 +1000
+++ /home/rjc/cron-3.0pl1/do_command.c 2008-09-19 19:03:43.000000000 +1000
@@ -332,10 +332,9 @@
#endif
#ifdef WITH_SELINUX
if ((is_selinux_enabled() > 0) && (u->scontext != 0L))
{
- security_context_t scontext;
if (setexeccon(u->scontext) < 0) {
if (security_getenforce() > 0) {
- fprintf(stderr, "Could not set exec
context to %s for user %s\n", scontext,u->name);
+ fprintf(stderr, "Could not set exec
context to %s for user %s\n", u->scontext,u->name);
_exit(ERROR_EXIT);
}
}
@@ -444,7 +443,7 @@
register int ch = getc(in);
if (ch != EOF) {
- register FILE *mail;
+ register FILE *mail = NULL;
register int bytes = 1;
int status = 0;
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]