f2de853269
- rewrite pam2 patch - check return value, use "better" macro, etc. - new version of at
49 lines
1.1 KiB
Diff
49 lines
1.1 KiB
Diff
diff -up at-3.1.11/at.c.log at-3.1.11/at.c
|
|
diff -up at-3.1.11/atd.c.log at-3.1.11/atd.c
|
|
--- at-3.1.11/atd.c.log 2009-10-01 13:05:17.000000000 +0200
|
|
+++ at-3.1.11/atd.c 2009-10-01 13:25:48.437638709 +0200
|
|
@@ -83,6 +83,10 @@
|
|
#include "getloadavg.h"
|
|
#endif
|
|
|
|
+#ifndef LOG_ATD
|
|
+#define LOG_ATD LOG_DAEMON
|
|
+#endif
|
|
+
|
|
/* Macros */
|
|
|
|
#define BATCH_INTERVAL_DEFAULT 60
|
|
@@ -195,6 +199,19 @@ myfork()
|
|
#define fork myfork
|
|
#endif
|
|
|
|
+#undef ATD_MAIL_PROGRAM
|
|
+#undef ATD_MAIL_NAME
|
|
+#if defined(SENDMAIL)
|
|
+#define ATD_MAIL_PROGRAM SENDMAIL
|
|
+#define ATD_MAIL_NAME "sendmail"
|
|
+#elif defined(MAILC)
|
|
+#define ATD_MAIL_PROGRAM MAILC
|
|
+#define ATD_MAIL_NAME "mail"
|
|
+#elif defined(MAILX)
|
|
+#define ATD_MAIL_PROGRAM MAILX
|
|
+#define ATD_MAIL_NAME "mailx"
|
|
+#endif
|
|
+
|
|
static void
|
|
run_file(const char *filename, uid_t uid, gid_t gid)
|
|
{
|
|
@@ -718,11 +735,7 @@ main(int argc, char *argv[])
|
|
|
|
RELINQUISH_PRIVS_ROOT(daemon_uid, daemon_gid)
|
|
|
|
-#ifndef LOG_CRON
|
|
-#define LOG_CRON LOG_DAEMON
|
|
-#endif
|
|
-
|
|
- openlog("atd", LOG_PID, LOG_CRON);
|
|
+ openlog("atd", LOG_PID, LOG_ATD);
|
|
|
|
opterr = 0;
|
|
errno = 0;
|