Environment variables can be set in the crontab. In BSD or ATT, the
environment handed to child processes is basically the one from /etc/rc.
.PP
+If the uid of the owner is 0 (root), he can put a "-" as first character of
+a crontab entry. This will prevent cron from writing a syslog message about
+this command getting executed.
+.PP
Command output is mailed to the crontab owner (BSD can't do this), can be
mailed to a person other than the crontab owner (SysV can't do this), or the
feature can be turned off and no mail will be sent at all (SysV can't do this
e = (entry *) calloc(sizeof (entry), sizeof (char));
+ /* check for '-' as a first character, this option will disable
+ * writing a syslog message about command getting executed
+ */
+ if (ch == '-') {
+ /* if we are editing system crontab or user uid is 0 (root)
+ * we are allowed to disable logging
+ */
+ if (pw == NULL || pw->pw_uid == 0)
+ e->flags |= DONT_LOG;
+ else {
+ log_it("CRON", getpid(), "error", "You could disable logging to syslog (using '-' option)" \
+ "only in system crontabs or crontabs assigned to user with uid 0 (root)", 0);
+ ecode = e_option;
+ goto eof;
+ }
+ ch = get_char(file);
+ if (ch == EOF)
+ return NULL;
+ }
+
if (ch == '@') {
/* all of these should be flagged and load-limited; i.e.,
* instead of @hourly meaning "0 * * * *" it should mean