- Update to 1.4.11

- I removed these patches: cronie-1.4.8-bug_756197.diff
bug-786096_cronie-fdleak.diff, since those issuas appear to have
been addressed upstream.

OBS-URL: https://build.opensuse.org/package/show/Base:System/cronie?expand=0&rev=121
This commit is contained in:
Wojtek Dziewięcki 2013-09-25 16:49:18 +00:00 committed by Git OBS Bridge
parent 8f2c4b688f
commit 170f7cdb82
8 changed files with 37 additions and 64 deletions

3
cronie-1.4.11.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:fd08084cedddbb42499f80ddb7f2158195c3555c2ff40ee11d4ece2f9864d7be
size 222665

View File

@ -1,22 +1,22 @@
Index: cronie-1.4.7/man/crontab.5
Index: cronie-1.4.11/man/crontab.5
===================================================================
--- cronie-1.4.7.orig/man/crontab.5
+++ cronie-1.4.7/man/crontab.5
@@ -203,6 +203,9 @@ fields. Use the first three letters of
day or month (case does not matter). Ranges or
lists of names are not allowed.
--- cronie-1.4.11.orig/man/crontab.5
+++ cronie-1.4.11/man/crontab.5
@@ -213,6 +213,9 @@ Names can also be used for the 'month' a
first three letters of the particular day or month (case does not
matter). Ranges or lists of names are not allowed.
.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
The "sixth" field (the rest of the line) specifies the command to be
run.
The "sixth" field (the rest of the line) specifies the command to be run.
The entire command portion of the line, up to a newline or a "%"
Index: cronie-1.4.7/src/entry.c
character, will be executed by /bin/sh or by the shell specified in the
Index: cronie-1.4.11/src/entry.c
===================================================================
--- cronie-1.4.7.orig/src/entry.c
+++ cronie-1.4.7/src/entry.c
@@ -105,13 +105,18 @@ entry *load_entry(FILE * file, void (*er
--- cronie-1.4.11.orig/src/entry.c
+++ cronie-1.4.11/src/entry.c
@@ -121,13 +121,18 @@ entry *load_entry(FILE * file, void (*er
if (ch == '-') {
/* if we are editing system crontab or user uid is 0 (root)
* we are allowed to disable logging
@ -38,9 +38,9 @@ Index: cronie-1.4.7/src/entry.c
}
ch = get_char(file);
if (ch == EOF)
@@ -371,9 +376,9 @@ entry *load_entry(FILE * file, void (*er
@@ -401,9 +406,9 @@ entry *load_entry(FILE * file, void (*er
Debug(DPARS, ("load_entry()...returning successfully\n"))
Debug(DPARS, ("load_entry()...returning successfully\n"));
- /* success, fini, return pointer to the entry we just created...
- */

View File

@ -1,20 +0,0 @@
--- man/crontab.5.orig 2012-04-10 10:02:06.520889184 -0400
+++ man/crontab.5 2012-04-10 10:03:19.752973655 -0400
@@ -19,7 +19,7 @@
.\"
.\" $Id: crontab.5,v 1.6 2004/01/23 19:03:33 vixie Exp $
.\"
-.TH ANACRONTAB 5 "July 2010" "Marcela Mašláňová" "Cronie Users' Manual"
+.TH CRONTAB 5 "July 2010" "Marcela Mašláňová" "Cronie Users' Manual"
.SH NAME
crontab \- files used to schedule the execution of programs
.SH DESCRIPTION
@@ -274,7 +274,7 @@
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.

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:a3b910876f255712f1a5c364b74f34b0ceac9f6f3bbc45e854c5722785f513b3
size 209994

View File

@ -2,25 +2,25 @@ Index: src/crontab.c
===================================================================
--- src/crontab.c.orig
+++ src/crontab.c
@@ -38,7 +38,7 @@
# include <selinux/av_permissions.h>
#endif
@@ -65,7 +65,7 @@
#include "pathnames.h"
#include "structs.h"
-#define NHEADER_LINES 0
+#define NHEADER_LINES 3
enum opt_t {opt_unknown, opt_list, opt_delete, opt_edit, opt_replace, opt_hostset, opt_hostget};
@@ -429,7 +429,7 @@ static char *host_specific_filename(char
static void edit_cmd(void) {
char n[MAX_FNAME], q[MAX_TEMPSTR], *editor;
@@ -475,7 +475,7 @@ static void edit_cmd(void) {
char n[MAX_FNAME], q[MAX_TEMPSTR];
const char *editor;
FILE *f;
- int ch = '\0', t;
+ int ch = '\0', t, x;
struct stat statbuf;
struct utimbuf utimebuf;
WAIT_T waiter;
@@ -481,13 +481,25 @@ static void edit_cmd(void) {
@@ -527,13 +527,25 @@ static void edit_cmd(void) {
}
Set_LineNum(1)
@ -53,7 +53,7 @@ Index: src/crontab.c
while (EOF != (ch = get_char(f)))
putc(ch, NewCrontab);
@@ -695,6 +707,7 @@ static int replace_cmd(void) {
@@ -741,6 +753,7 @@ static int replace_cmd(void) {
int error = 0;
entry *e;
uid_t file_owner;
@ -61,7 +61,7 @@ Index: src/crontab.c
char **envp;
char *safename;
@@ -724,10 +737,10 @@ static int replace_cmd(void) {
@@ -770,10 +783,10 @@ static int replace_cmd(void) {
*
* VERY IMPORTANT: make sure NHEADER_LINES agrees with this code.
*/

View File

@ -1,6 +1,8 @@
Index: src/misc.c
===================================================================
--- src/misc.c.orig
+++ src/misc.c
@@ -293,6 +293,8 @@ void acquire_daemonlock(int closeflag) {
@@ -311,6 +311,8 @@ void acquire_daemonlock(int closeflag) {
return;
}
@ -9,14 +11,3 @@
if (fd == -1) {
pidfile = _PATH_CRON_PID;
/* Initial mode is 0600 to prevent flock() race/DoS. */
--- src/cron.c.orig
+++ src/cron.c
@@ -600,7 +600,7 @@ static void sigchld_handler(int x) {
}
static void quit(int x) {
- (void) unlink(_PATH_CRON_PID);
+ if(NoFork == 0) unlink(_PATH_CRON_PID);
_exit(0);
}

View File

@ -1,4 +1,11 @@
-------------------------------------------------------------------
Wed Sep 25 16:02:13 UTC 2013 - vdziewiecki@suse.com
- Update to 1.4.11
- I removed these patches: cronie-1.4.8-bug_756197.diff
bug-786096_cronie-fdleak.diff, since those issuas appear to have
been addressed upstream.
-------------------------------------------------------------------
Tue Sep 10 21:30:58 UTC 2013 - crrodriguez@opensuse.org
- define PIDIDIR to "/run" instead of the (outdated) definition

View File

@ -29,7 +29,7 @@ Recommends: smtp_daemon
Suggests: postfix
PreReq: permissions %fillup_prereq %insserv_prereq cron
%{?systemd_requires}
Version: 1.4.8
Version: 1.4.11
Release: 0
%{expand: %%define cronie_version %version}
Summary: Cron Daemon
@ -56,10 +56,7 @@ Patch5: %name-crond_pid.diff
Patch7: cronie-1.4.7-disable_logging.patch
# PATCH-FIX-UPSTREAM use run-crons instead of run-parts for anacron (bnc#689494)
Patch8: cronie-anacron-1.4.7-run-crons.patch
Patch9: cronie-1.4.8-bug_756197.diff
Patch10: cronie-nofork-nopid.patch
# PATCH-FIX-UPSTREAM bnc#786096
Patch11: bug-786096_cronie-fdleak.diff
Patch12: cronie-piddir.patch
Conflicts: cron <= 4.1
# When finish update protection of sles11 we could uncomment line bellow and drop all
@ -103,10 +100,8 @@ overloaded in settings.
%patch5 -p1
%patch7 -p1
%patch8 -p1
%patch9
cp %{S:7} ./cron_to_cronie.README
%patch10
%patch11 -p1
%patch12 -p1
%build
# fill macro CRON_VERSION it is used in top three lines of crontab file,should be reworked