Update cronie to 1.5.7
This commit is contained in:
parent
ca440e4fb0
commit
e4a309e1ee
@ -1,31 +0,0 @@
|
|||||||
From 05f5f1834d31e4d9480b59d4e8bd3e999a62fa40 Mon Sep 17 00:00:00 2001
|
|
||||||
From: John Horne <john.horne@plymouth.ac.uk>
|
|
||||||
Date: Mon, 20 Apr 2020 16:02:31 +0100
|
|
||||||
Subject: [PATCH] Add CMDEND log entry to log when cron jobs end.
|
|
||||||
|
|
||||||
---
|
|
||||||
src/do_command.c | 8 ++++++++
|
|
||||||
1 file changed, 8 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/src/do_command.c b/src/do_command.c
|
|
||||||
index ed56775..dda8ff7 100644
|
|
||||||
--- a/src/do_command.c
|
|
||||||
+++ b/src/do_command.c
|
|
||||||
@@ -581,6 +581,14 @@ static int child_process(entry * e, char **jobenv) {
|
|
||||||
Debug(DPROC,
|
|
||||||
("[%ld] no more grandchildren--mail written?\n",
|
|
||||||
(long) getpid()));
|
|
||||||
+
|
|
||||||
+ if ((e->flags & DONT_LOG) == 0) {
|
|
||||||
+ char *x = mkprints((u_char *) e->cmd, strlen(e->cmd));
|
|
||||||
+
|
|
||||||
+ log_it(usernm, getpid(), "CMDEND", x, 0);
|
|
||||||
+ free(x);
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
Debug(DPROC, ("[%ld] grandchild #%ld finished, status=%04x",
|
|
||||||
--
|
|
||||||
1.8.3.1
|
|
||||||
|
|
||||||
@ -1,25 +0,0 @@
|
|||||||
From 59063efa62fbb75bb75ad34a9e9c551b77284377 Mon Sep 17 00:00:00 2001
|
|
||||||
From: John Horne <john.horne@plymouth.ac.uk>
|
|
||||||
Date: Mon, 20 Apr 2020 20:16:29 +0100
|
|
||||||
Subject: [PATCH] Ensure the command name is not null before logging it.
|
|
||||||
|
|
||||||
---
|
|
||||||
src/do_command.c | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/src/do_command.c b/src/do_command.c
|
|
||||||
index 76939a1..d1594c6 100644
|
|
||||||
--- a/src/do_command.c
|
|
||||||
+++ b/src/do_command.c
|
|
||||||
@@ -592,7 +592,7 @@ static int child_process(entry * e, char **jobenv) {
|
|
||||||
if ((e->flags & DONT_LOG) == 0) {
|
|
||||||
char *x = mkprints((u_char *) e->cmd, strlen(e->cmd));
|
|
||||||
|
|
||||||
- log_it(usernm, getpid(), "CMDEND", x, 0);
|
|
||||||
+ log_it(usernm, getpid(), "CMDEND", x ? x : "Unknown command" , 0);
|
|
||||||
free(x);
|
|
||||||
}
|
|
||||||
return OK_EXIT;
|
|
||||||
--
|
|
||||||
1.8.3.1
|
|
||||||
|
|
||||||
@ -1,46 +0,0 @@
|
|||||||
From 22ae88868f48090e2a5ad4b9bb165581df91511f Mon Sep 17 00:00:00 2001
|
|
||||||
From: Josef Schlehofer <pepe.schlehofer@gmail.com>
|
|
||||||
Date: Sun, 24 Nov 2019 17:22:49 +0100
|
|
||||||
Subject: [PATCH] Fix incorrect include of fcntl.h
|
|
||||||
|
|
||||||
---
|
|
||||||
configure.ac | 1 -
|
|
||||||
src/cron.c | 5 +----
|
|
||||||
2 files changed, 1 insertion(+), 5 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/configure.ac b/configure.ac
|
|
||||||
index bffe9ad..5493261 100644
|
|
||||||
--- a/configure.ac
|
|
||||||
+++ b/configure.ac
|
|
||||||
@@ -38,7 +38,6 @@ AC_CHECK_HEADERS( \
|
|
||||||
sys/timers.h \
|
|
||||||
sys/types.h \
|
|
||||||
sys/cdefs.h \
|
|
||||||
- sys/fcntl.h \
|
|
||||||
time.h \
|
|
||||||
unistd.h \
|
|
||||||
util.h \
|
|
||||||
diff --git a/src/cron.c b/src/cron.c
|
|
||||||
index 7eabfe9..40e1e76 100644
|
|
||||||
--- a/src/cron.c
|
|
||||||
+++ b/src/cron.c
|
|
||||||
@@ -40,15 +40,12 @@
|
|
||||||
#include <sys/wait.h>
|
|
||||||
#include <unistd.h>
|
|
||||||
#include <sys/time.h>
|
|
||||||
+#include <fcntl.h>
|
|
||||||
|
|
||||||
#ifdef WITH_INOTIFY
|
|
||||||
# include <sys/inotify.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
-#ifdef HAVE_SYS_FCNTL_H
|
|
||||||
-# include <sys/fcntl.h>
|
|
||||||
-#endif
|
|
||||||
-
|
|
||||||
#include "cronie_common.h"
|
|
||||||
#include "funcs.h"
|
|
||||||
#include "globals.h"
|
|
||||||
--
|
|
||||||
1.8.3.1
|
|
||||||
|
|
||||||
@ -1,35 +0,0 @@
|
|||||||
From 654b85488b128aab5baf8feee71f38b763425d56 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Tomas Mraz <tmraz@fedoraproject.org>
|
|
||||||
Date: Tue, 21 Apr 2020 09:30:03 +0200
|
|
||||||
Subject: [PATCH] Handle out-of-memory condition from mkprints() call
|
|
||||||
|
|
||||||
---
|
|
||||||
src/do_command.c | 5 ++++-
|
|
||||||
1 file changed, 4 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/src/do_command.c b/src/do_command.c
|
|
||||||
index d1594c6..b4f1d18 100644
|
|
||||||
--- a/src/do_command.c
|
|
||||||
+++ b/src/do_command.c
|
|
||||||
@@ -194,6 +194,9 @@ static int child_process(entry * e, char **jobenv) {
|
|
||||||
if ((e->flags & DONT_LOG) == 0) {
|
|
||||||
char *x = mkprints((u_char *) e->cmd, strlen(e->cmd));
|
|
||||||
|
|
||||||
+ if (x == NULL) /* out of memory, better exit */
|
|
||||||
+ _exit(ERROR_EXIT);
|
|
||||||
+
|
|
||||||
log_it(usernm, getpid(), "CMD", x, 0);
|
|
||||||
free(x);
|
|
||||||
}
|
|
||||||
@@ -592,7 +595,7 @@ static int child_process(entry * e, char **jobenv) {
|
|
||||||
if ((e->flags & DONT_LOG) == 0) {
|
|
||||||
char *x = mkprints((u_char *) e->cmd, strlen(e->cmd));
|
|
||||||
|
|
||||||
- log_it(usernm, getpid(), "CMDEND", x ? x : "Unknown command" , 0);
|
|
||||||
+ log_it(usernm, getpid(), "CMDEND", x ? x : "**Unknown command**" , 0);
|
|
||||||
free(x);
|
|
||||||
}
|
|
||||||
return OK_EXIT;
|
|
||||||
--
|
|
||||||
1.8.3.1
|
|
||||||
|
|
||||||
@ -1,44 +0,0 @@
|
|||||||
From 79d403e34e8a65b7f4c21f0dcb31fcc9c6fabc7d Mon Sep 17 00:00:00 2001
|
|
||||||
From: John Horne <john.horne@plymouth.ac.uk>
|
|
||||||
Date: Mon, 20 Apr 2020 16:59:53 +0100
|
|
||||||
Subject: [PATCH] Moved CMDEND code to outside for for loop.
|
|
||||||
|
|
||||||
---
|
|
||||||
src/do_command.c | 14 ++++++--------
|
|
||||||
1 file changed, 6 insertions(+), 8 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/do_command.c b/src/do_command.c
|
|
||||||
index dda8ff7..76939a1 100644
|
|
||||||
--- a/src/do_command.c
|
|
||||||
+++ b/src/do_command.c
|
|
||||||
@@ -581,14 +581,6 @@ static int child_process(entry * e, char **jobenv) {
|
|
||||||
Debug(DPROC,
|
|
||||||
("[%ld] no more grandchildren--mail written?\n",
|
|
||||||
(long) getpid()));
|
|
||||||
-
|
|
||||||
- if ((e->flags & DONT_LOG) == 0) {
|
|
||||||
- char *x = mkprints((u_char *) e->cmd, strlen(e->cmd));
|
|
||||||
-
|
|
||||||
- log_it(usernm, getpid(), "CMDEND", x, 0);
|
|
||||||
- free(x);
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
Debug(DPROC, ("[%ld] grandchild #%ld finished, status=%04x",
|
|
||||||
@@ -597,6 +589,12 @@ static int child_process(entry * e, char **jobenv) {
|
|
||||||
Debug(DPROC, (", dumped core"));
|
|
||||||
Debug(DPROC, ("\n"));
|
|
||||||
}
|
|
||||||
+ if ((e->flags & DONT_LOG) == 0) {
|
|
||||||
+ char *x = mkprints((u_char *) e->cmd, strlen(e->cmd));
|
|
||||||
+
|
|
||||||
+ log_it(usernm, getpid(), "CMDEND", x, 0);
|
|
||||||
+ free(x);
|
|
||||||
+ }
|
|
||||||
return OK_EXIT;
|
|
||||||
}
|
|
||||||
|
|
||||||
--
|
|
||||||
1.8.3.1
|
|
||||||
|
|
||||||
Binary file not shown.
BIN
cronie-1.5.7.tar.gz
Normal file
BIN
cronie-1.5.7.tar.gz
Normal file
Binary file not shown.
15
cronie.spec
15
cronie.spec
@ -1,6 +1,6 @@
|
|||||||
Name: cronie
|
Name: cronie
|
||||||
Version: 1.5.5
|
Version: 1.5.7
|
||||||
Release: 4
|
Release: 1
|
||||||
Summary: Standard UNIX daemon crond
|
Summary: Standard UNIX daemon crond
|
||||||
License: GPLv2+ and ISC
|
License: GPLv2+ and ISC
|
||||||
URL: https://github.com/cronie-crond/cronie
|
URL: https://github.com/cronie-crond/cronie
|
||||||
@ -8,11 +8,6 @@ Source0: https://github.com/cronie-crond/cronie/releases/download/cronie-%{vers
|
|||||||
|
|
||||||
|
|
||||||
Patch0: bugfix-cronie-systemd-alias.patch
|
Patch0: bugfix-cronie-systemd-alias.patch
|
||||||
Patch1: Fix-incorrect-include-of-fcntl.h.patch
|
|
||||||
Patch2: Add-CMDEND-log-entry-to-log-when-cron-jobs-end.patch
|
|
||||||
Patch3: Moved-CMDEND-code-to-outside-for-for-loop.patch
|
|
||||||
Patch4: Ensure-the-command-name-is-not-null-before-logging-i.patch
|
|
||||||
Patch5: Handle-out-of-memory-condition-from-mkprints-call.patch
|
|
||||||
|
|
||||||
BuildRequires: automake
|
BuildRequires: automake
|
||||||
BuildRequires: gcc systemd libselinux-devel pam-devel audit-libs-devel
|
BuildRequires: gcc systemd libselinux-devel pam-devel audit-libs-devel
|
||||||
@ -123,6 +118,12 @@ systemctl try-restart crond.service >/dev/null 2>&1 || :
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Dec 30 2021 wangjie <wangjie375@huawei.com> - 1.5.7-1
|
||||||
|
- Type:enhancement
|
||||||
|
- ID:NA
|
||||||
|
- SUG:NA
|
||||||
|
- DESC: Update cronie to 1.5.7
|
||||||
|
|
||||||
* Fri Jul 30 2021 chenyanpanHW <chenyanpan@huawei.com> - 1.5.5-4
|
* Fri Jul 30 2021 chenyanpanHW <chenyanpan@huawei.com> - 1.5.5-4
|
||||||
- DESC: delete -S git from %autosetup, and delete BuildRequires git
|
- DESC: delete -S git from %autosetup, and delete BuildRequires git
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user