Commit d352ed26 authored by Andreas Henriksson's avatar Andreas Henriksson

Modify patches to apply against new upstream release

Drop obsolete hunks and update still valid parts to apply again.
Have quilt refresh all patches. (Last patch was only refreshed.)

No investigations have been done if new upstream release has
gained anything new that needs to be patched in the same spirit
as the existing patches does.
parent fc862140
......@@ -12,43 +12,30 @@ Last-Update: 2011-07-28
man/crontab.5 | 2 +-
2 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/man/cron.8 b/man/cron.8
index 8f36a51..36006ca 100644
--- a/man/cron.8
+++ b/man/cron.8
@@ -49,8 +49,7 @@ for crontab files which are named after accounts in
@@ -56,8 +56,7 @@
The found crontabs are loaded into the memory.
.I Cron
also searches for
also searches for
-.I /etc/anacrontab
-and any files in the
-and any files in the
+any files in the
.I /etc/cron.d
.I /etc/cron.d
directory, which have a different format (see
.BR crontab (5)).
@@ -82,9 +81,9 @@ crontables were modified. The modtime option is also used when inotify can not b
.PP
.I Cron
@@ -91,12 +90,8 @@
checks these files and directories:
.TP
.IR /etc/crontab
-system crontab. Nowadays the file is empty by default. Originally it
-was usually used to run daily, weekly, monthly jobs. By default these
-jobs are now run through anacron which reads
-.IR /etc/anacrontab
+.IR /etc/crontab
system crontab, usually used to run daily, weekly, monthly jobs. See
-configuration file. See
-.BR anacrontab (5)
+system crontab, usually used to run daily, weekly, monthly jobs. See
+.BR crontab (5)
for more details.
.TP
.IR /etc/cron.d/
directory that contains system cronjobs stored for different users.
diff --git a/man/crontab.5 b/man/crontab.5
index 0132fc7..6853b73 100644
--- a/man/crontab.5
+++ b/man/crontab.5
@@ -274,7 +274,7 @@ MLS_LEVEL=SystemHigh
0-59 * * * * id -Z > /tmp/SystemHigh/crontest
.fi
.SH FILES
-.I /etc/anacrontab
+.I /etc/crontab
system crontab file for jobs like cron.daily, weekly, monthly.
.I /var/spool/cron/
a directory for storing crontabs defined by users.
--
......@@ -10,33 +10,27 @@ Correct some errors or clarify sections in the manpages; fix some typos
src/cron.c | 4 ++--
4 files changed, 27 insertions(+), 30 deletions(-)
diff --git a/man/cron.8 b/man/cron.8
index 36006ca..e20455e 100644
--- a/man/cron.8
+++ b/man/cron.8
@@ -27,7 +27,7 @@
crond \- daemon to execute scheduled commands
.SH SYNOPSIS
.B crond
-.RB [ -n " | " -p " | " -s " | " -c " | " -m \fP\fI<mail command>\fP ]
+.RB [ -n " | " -i " | " -p " | " -s " | " -c " | " -m \fP\fI<mail command>\fP ]
.B crond
.B -x
@@ -35,18 +35,15 @@ crond \- daemon to execute scheduled commands
.br
@@ -37,23 +37,15 @@
.B -V
.SH DESCRIPTION
.I Cron
-is started from
-.I /etc/rc.d/init.d
-or
-is started from
-.I /etc/rc.d/init.d
-or
-.I /etc/init.d
-It returns immediately, thus, there is no need to need to start it with the '&' parameter.
-when classical sysvinit scripts are used. In case systemd is enabled, then unit file is installed into
-.I /lib/systemd/system/crond.service
-and daemon is started by
-.I systemctl start crond.service
-command. It returns immediately, thus, there is no need to need to start it with
-the '&' parameter.
+is automatically started at boot time.
.PP
.I Cron
searches
.I /var/spool/cron
searches
.I /var/spool/cron
-for crontab files which are named after accounts in
-.I /etc/passwd;
-The found crontabs are loaded into the memory.
......@@ -45,136 +39,95 @@ index 36006ca..e20455e 100644
+.IR /etc/crontab ,
+the found crontabs are loaded into the memory.
.I Cron
also searches for
also searches for
any files in the
@@ -65,10 +62,10 @@ Any job output can also be sent to syslog by using the
@@ -71,12 +63,11 @@
option.
.PP
There are two ways how changes in crontables are checked. The first
-method is checking the modtime of a file. The second method is using the inotify support.
-Using of inotify is logged in the
There are two ways how changes in crontables are checked. The first
-method is checking the modtime of a file. The second method is using the
-inotify support. Using of inotify is logged in the
-.I /var/log/cron
-log after the daemon is started. The inotify support checks for changes in all crontables and accesses the
-log after the daemon is started. The inotify support checks for changes
-in all crontables and accesses the hard disk only when a change is
-detected.
+method is checking the modtime of a file. The second method
+is using inotify support, which is only available on Linux.
+When the daemon uses inotify, it logs this fact to syslog on startup.
+The inotify support checks for changes in all crontables and accesses the
hard disk only when a change is detected.
+hard disk only when a change is detected.
.PP
When using the modtime option,
@@ -89,13 +86,9 @@ for more details.
directory that contains system cronjobs stored for different users.
.I Cron
@@ -99,13 +90,8 @@
.TP
.IR /var/spool/cron
directory that contains user crontables created by the
-.IR crontab
+.BR crontab (1)
command.
-.IR crontab
-command.
-.PP
-Note that the
-.BR crontab (1)
.BR crontab (1)
-command updates the modtime of the spool directory whenever it changes a
-crontab.
+command.
.PP
.SS Daylight Saving Time and other time changes
Local time changes of less than three hours, such as those caused
@@ -135,16 +128,20 @@ This command must accept a fully formatted mail message (with headers) on standa
as a mail message to the recipients specified in the mail headers. Specifying
the string
.I "off"
-(i.e. crond -m off)
+(i.e. crond \-m off)
Local time changes of less than three hours, such as those caused by the
@@ -153,7 +139,6 @@
standard input and send it as a mail message to the recipients specified
in the mail headers. Specifying the string
.I "off"
-(i.e., crond -m off)
will disable the sending of mail.
.TP
.B "\-n"
Tells the daemon to run in the foreground. This can be useful when starting it out of init.
@@ -164,10 +149,14 @@
.I pam_loginuid.so
module.
.TP
+.B "\-i"
+Disables inotify support (if present)
+.TP
.B "\-p"
Allows
Allows
.I Cron
-to accept any user set crontables.
+to accept any user set crontables (read: lift owner, type and mode
+restrictions)
.TP
.B "\-c"
This option enables clustering support, as described below.
diff --git a/man/crontab.1 b/man/crontab.1
index d35331a..c1c8bae 100644
.B "\-P"
Don't set PATH. PATH is instead inherited from the environment.
--- a/man/crontab.1
+++ b/man/crontab.1
@@ -86,7 +86,7 @@ or modify system cron jobs in the
.IR /etc/cron.d/
@@ -94,7 +94,7 @@
.IR /etc/cron.d/
directory.
.PP
-The temporary directory can be set in an environment variable. If it is not set
+The temporary directory can be set using the environment variable $TMPDIR. If it is not set
by the user, the
-The temporary directory can be set in an environment variable. If it is
+The temporary directory can be set using the environment variable $TMPDIR. If it is
not set by the user, the
.I /tmp
directory is used.
diff --git a/man/crontab.5 b/man/crontab.5
index 6853b73..03c034f 100644
--- a/man/crontab.5
+++ b/man/crontab.5
@@ -35,7 +35,7 @@ their own crontabs, eliminating the need for explicitly running
as part of a cron command.
.PP
Blank lines, leading spaces, and tabs are ignored. Lines whose first
-non-white space character is a pound-sign (#) are comments, and are note processed.
+non-white space character is a pound-sign (#) are comments, and are not processed.
Note that comments are not allowed on the same line as cron commands, since
they are considered a part of the command. Similarly, comments are not
allowed on the same line as environment variable settings.
@@ -235,7 +235,7 @@ CRON_TZ=Japan
# run at 2:15pm on the first of every month -- output mailed to paul
15 14 1 * * $HOME/bin/monthly
# run at 10 pm on weekdays, annoy Joe
-0 22 * * 1-5 mail -s "It's 10pm" joe%Joe,%%Where are your kids?%
@@ -248,7 +248,7 @@
# run at 2:15pm on the first of every month -- output mailed to paul
15 14 1 * * $HOME/bin/monthly
# run at 10 pm on weekdays, annoy Joe
-0 22 * * 1-5 mail -s "It's 10pm" joe%Joe,%%Where are your kids?%
+0 22 * * 1-5 mail \-s "It's 10pm" joe%Joe,%%Where are your kids?%
23 0-23/2 * * * echo "run 23 minutes after midn, 2am, 4am ..., everyday"
5 4 * * sun echo "run at 5 after 4 every sunday"
.fi
@@ -255,7 +255,7 @@ MAILTO=root
* * * * * root touch /tmp/file
.fi
.SH SELinux with multi level security (MLS)
-In a crontab, it is important to specify a security level by \fIcrontab\ -s\fR or specifying
+In a crontab, it is important to specify a security level by \fIcrontab\ \-s\fR or specifying
the required level on the first line of the crontab. Each level is specified
in \fI/etc/selinux/targeted/seusers\fR. When using crontab in the MLS mode, it is especially important to:
.br
@@ -265,13 +265,13 @@ in \fI/etc/selinux/targeted/seusers\fR. When using crontab in the MLS mode, it i
.SH EXAMPLE FOR SELINUX MLS
.nf
# login as root
-newrole -r sysadm_r
+newrole \-r sysadm_r
mkdir /tmp/SystemHigh
-chcon -l SystemHigh /tmp/SystemHigh
-crontab -e
+chcon \-l SystemHigh /tmp/SystemHigh
+crontab \-e
# write in crontab file
MLS_LEVEL=SystemHigh
-0-59 * * * * id -Z > /tmp/SystemHigh/crontest
+0-59 * * * * id \-Z > /tmp/SystemHigh/crontest
23 0-23/2 * * * echo "run 23 minutes after midn, 2am, 4am ..., everyday"
5 4 * * sun echo "run at 5 after 4 every sunday"
.fi
.SH FILES
.I /etc/crontab
diff --git a/src/cron.c b/src/cron.c
index 7dc2958..760bafe 100644
--- a/src/cron.c
+++ b/src/cron.c
@@ -137,8 +137,8 @@ static void usage(void) {
const char **dflags;
fprintf(stderr, "usage: %s [-h] print this message \n \
- [-i] deamon runs without inotify support \n \
- [-m <mail command>] off or specify prefered client for sending mails \n \
+ [-i] daemon runs without inotify support \n \
+ [-m <mail command>] off or specify preferred client for sending mails \n \
[-n] run in foreground \n \
[-p] permit any crontab \n \
[-c] enable clustering support \n \
--
@@ -181,7 +181,7 @@
fprintf(stderr, "\n");
fprintf(stderr, "Options:\n");
fprintf(stderr, " -h print this message \n");
- fprintf(stderr, " -i deamon runs without inotify support\n");
+ fprintf(stderr, " -i daemon runs without inotify support\n");
fprintf(stderr, " -m <comm> off, or specify preferred client for sending mails\n");
fprintf(stderr, " -n run in foreground\n");
fprintf(stderr, " -p permit any crontab\n");
......@@ -12,33 +12,26 @@ Last-Update: 2011-07-28
src/security.c | 2 +-
2 files changed, 1 insertions(+), 6 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index 05c541a..8fa4d97 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -3,11 +3,6 @@ if ANACRON
SUBDIRS += anacron
endif
@@ -13,9 +13,3 @@
contrib/cronie.systemd \
anacron/ChangeLog.anacron
-if PAM
-pamdir = $(sysconfdir)/pam.d
-dist_pam_DATA = pam/crond
-else
-EXTRA_DIST += pam/crond
-endif
-
EXTRA_DIST = cronie.init crond.sysconfig contrib/anacrontab \
contrib/0anacron contrib/0hourly \
contrib/dailyjobs
diff --git a/src/security.c b/src/security.c
index f6940a5..28dda4d 100644
--- a/src/security.c
+++ b/src/security.c
@@ -172,7 +172,7 @@ int cron_start_pam(struct passwd *pw) {
@@ -195,7 +195,7 @@
int cron_start_pam(struct passwd *pw) {
int retcode = 0;
#if defined(WITH_PAM)
- retcode = pam_start("crond", pw->pw_name, &conv, &pamh);
+ retcode = pam_start("cronie", pw->pw_name, &conv, &pamh);
PAM_FAIL_CHECK;
retcode = pam_set_item(pamh, PAM_TTY, "cron");
PAM_FAIL_CHECK;
--
......@@ -13,68 +13,63 @@ Last-Update: 2011-07-28
man/crontab.5 | 2 +-
3 files changed, 4 insertions(+), 13 deletions(-)
diff --git a/man/cron.8 b/man/cron.8
index e20455e..5f83546 100644
--- a/man/cron.8
+++ b/man/cron.8
@@ -39,7 +39,7 @@ is automatically started at boot time.
@@ -41,7 +41,7 @@
.PP
.I Cron
searches
-.I /var/spool/cron
searches
-.I /var/spool/cron
+.I /var/spool/cron/crontabs
for crontab files which are named after user accounts;
together with the system crontab
.IR /etc/crontab ,
@@ -84,7 +84,7 @@ system crontab, usually used to run daily, weekly, monthly jobs. See
for more details.
@@ -88,7 +88,7 @@
.IR /etc/cron.d/
directory that contains system cronjobs stored for different users.
.TP
-.IR /var/spool/cron
+.IR /var/spool/cron/crontabs
directory that contains user crontables created by the
.BR crontab (1)
command.
@@ -157,15 +157,6 @@ installed or if mail is disabled.
@@ -178,17 +178,6 @@
.TP
.B "\-x"
This option allows you to set debug flags.
.B "\-V"
Print version and exit.
-.SH SIGNALS
-When the \s-2SIGHUP\s+2 is received, the
-.I Cron
-daemon will close and reopen its
-log file. This proves to be useful in scripts which rotate and age log files.
-Naturally, this is not relevant if
-When the
-.I SIGHUP
-is received, the
-.I Cron
-daemon will close and reopen its log file. This proves to be useful in
-scripts which rotate and age log files. Naturally, this is not relevant
-if
-.I Cron
-was built to use
-.IR syslog (3).
.SH CLUSTERING SUPPORT
In this version of
.IR Cron
diff --git a/man/crontab.1 b/man/crontab.1
index c1c8bae..9c32c8e 100644
--- a/man/crontab.1
+++ b/man/crontab.1
@@ -56,7 +56,7 @@ more crontabs for each range. For more information, see
@@ -61,7 +61,7 @@
In this version of
.IR Cron
it is possible to use a network-mounted shared
-.I /var/spool/cron
-.I /var/spool/cron
+.I /var/spool/cron/crontabs
across a cluster of hosts and specify that only one of the hosts should
run the crontab jobs in the particular directory at any one time. You may also use
.BR crontab (1)
diff --git a/man/crontab.5 b/man/crontab.5
index 03c034f..8a3692b 100644
run the crontab jobs in the particular directory at any one time. You
may also use
--- a/man/crontab.5
+++ b/man/crontab.5
@@ -276,7 +276,7 @@ MLS_LEVEL=SystemHigh
@@ -295,7 +295,7 @@
.SH FILES
.I /etc/crontab
system crontab file for jobs like cron.daily, weekly, monthly.
main system crontab file.
-.I /var/spool/cron/
+.I /var/spool/cron/crontabs
a directory for storing crontabs defined by users.
.I /etc/cron.d/
a directory for storing system crontables.
--
a directory for storing system crontabs.
......@@ -12,11 +12,9 @@ Last-Update: 2011-08-07
src/pathnames.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/entry.c b/src/entry.c
index 5d377c6..d03ddb1 100644
--- a/src/entry.c
+++ b/src/entry.c
@@ -335,7 +335,7 @@ entry *load_entry(FILE * file, void (*error_func) (), struct passwd *pw,
@@ -374,7 +374,7 @@
}
else
log_it("CRON", getpid(), "ERROR", "can't set LOGNAME", 0);
......@@ -25,8 +23,6 @@ index 5d377c6..d03ddb1 100644
if (glue_strings(envstr, sizeof envstr, "USER", pw->pw_name, '=')) {
if ((tenvp = env_set(e->envp, envstr)) == NULL) {
ecode = e_memory;
diff --git a/src/pathnames.h b/src/pathnames.h
index b5d5c70..25d90c3 100644
--- a/src/pathnames.h
+++ b/src/pathnames.h
@@ -26,7 +26,7 @@
......@@ -38,4 +34,3 @@ index b5d5c70..25d90c3 100644
# include <paths.h>
#endif /*BSD*/
--
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment