bin/167203: [patch] make cron(8) use just "cron" when syslogging
Andrew Pantyukhin
infofarmer at FreeBSD.org
Sun Apr 22 14:00:44 UTC 2012
>Number: 167203
>Category: bin
>Synopsis: [patch] make cron(8) use just "cron" when syslogging
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Sun Apr 22 14:00:43 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator: Andrew Pantyukhin
>Release: FreeBSD 9.0-STABLE
>Organization:
>Environment:
FreeBSD z1.zvq.me 9.0-STABLE FreeBSD 9.0-STABLE #15 r234035: Sun Apr 8 15:05:22 UTC 2012 root at z1:/usr/obj/usr/src/sys/GENVIMG amd64
>Description:
cron(8) is one of the rare services that puts something complicated in
ident (aka progname aka programname) field of the syslog messages it
sends: /usr/sbin/cron[PID]. Attached patch changes it to
just "cron" to ease filtering with stock and third-party syslog
daemons, expecting no ":", "[", and "/" in the field.
>How-To-Repeat:
>Fix:
Patch attached.
Patch attached with submission follows:
Index: usr.sbin/cron/lib/misc.c
===================================================================
--- usr.sbin/cron/lib/misc.c (revision 234571)
+++ usr.sbin/cron/lib/misc.c (working copy)
@@ -452,9 +452,9 @@
* print the pid ourselves.
*/
# ifdef LOG_DAEMON
- openlog(ProgramName, LOG_PID, LOG_CRON);
+ openlog("cron", LOG_PID, LOG_CRON);
# else
- openlog(ProgramName, LOG_PID);
+ openlog("cron", LOG_PID);
# endif
syslog_open = TRUE; /* assume openlog success */
}
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-bugs
mailing list