From cfe037d46de3ba0eac43dc42f0234aee90c0dc58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Poho=C5=99elsk=C3=BD?= Date: Mon, 26 Feb 2024 09:32:05 +0100 Subject: [PATCH 01/15] Update to 1.7.1 --- .gitignore | 1 + cronie.spec | 4 +-- ...ait_on_finnishing_grandchild_process.patch | 25 ------------------- sources | 2 +- 4 files changed, 3 insertions(+), 29 deletions(-) delete mode 100644 n_option_wait_on_finnishing_grandchild_process.patch diff --git a/.gitignore b/.gitignore index 4079eb0..14befbb 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ /cronie-1.6.0.tar.gz /cronie-1.6.1.tar.gz /cronie-1.7.0.tar.gz +/cronie-1.7.1.tar.gz diff --git a/cronie.spec b/cronie.spec index fc4df93..6b48080 100644 --- a/cronie.spec +++ b/cronie.spec @@ -5,14 +5,12 @@ Summary: Cron daemon for executing programs at set times Name: cronie -Version: 1.7.0 +Version: 1.7.1 Release: %autorelease License: GPL-2.0-or-later AND BSD-3-Clause AND BSD-2-Clause AND ISC AND LGPL-2.1-or-later URL: https://github.com/cronie-crond/cronie Source0: https://github.com/cronie-crond/cronie/releases/download/cronie-%{version}/cronie-%{version}.tar.gz -# https://github.com/cronie-crond/cronie/pull/163 -Patch: n_option_wait_on_finnishing_grandchild_process.patch Requires: dailyjobs diff --git a/n_option_wait_on_finnishing_grandchild_process.patch b/n_option_wait_on_finnishing_grandchild_process.patch deleted file mode 100644 index b01c6f5..0000000 --- a/n_option_wait_on_finnishing_grandchild_process.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 5cf85f8cbb816ff1df5b317d6f8559b67e1993dd Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Ond=C5=99ej=20Poho=C5=99elsk=C3=BD?= -Date: Wed, 25 Oct 2023 10:58:46 +0200 -Subject: [PATCH] -n option: wait on finnishing grandchild process - -With `WNOHANG` we skip sending the email when waitpid() returns 0, -which happens if the process is still running. Instead, using `0` -parameter will wait for the process to actually stop running. ---- - 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 d7ca840..2ada913 100644 ---- a/src/do_command.c -+++ b/src/do_command.c -@@ -579,7 +579,7 @@ static int child_process(entry * e, char **jobenv) { - if (mail && e->flags & MAIL_WHEN_ERR) { - int jobstatus = -1; - if (jobpid > 0) { -- while (waitpid(jobpid, &jobstatus, WNOHANG) == -1) { -+ while (waitpid(jobpid, &jobstatus, 0) == -1) { - if (errno == EINTR) continue; - log_it("CRON", getpid(), "error", "invalid job pid", errno); - break; diff --git a/sources b/sources index 22b8e68..9c61c48 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (cronie-1.7.0.tar.gz) = a8e6688a164540e2cd3741c58813b6684c4c22a04806bcc8ba028a9ff72f986f165715ac3663bd34133af6566bdbd272a3e7be893f139e315aef35b2dbeb622f +SHA512 (cronie-1.7.1.tar.gz) = 4479f6f05ca9da3ecefa0e9b73662f1db58ffff309916de9f92f89c5e7f93f1c5c744f18cb3e1a3df9664d533afe7dad710f97484e72a314c87d84f57a6c56fb From 218115d9c939e9f8b2c6cfa1a736df157a26f9e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Stan=C4=9Bk?= Date: Mon, 1 Jul 2024 14:51:31 +0200 Subject: [PATCH 02/15] Update to version 1.7.2 (rhbz#2294896) - Polish bconds to use newer macros - Patch leaks found by SAST scan --- .gitignore | 13 +----- 0001-do-no-leak-file-descriptors.patch | 61 ++++++++++++++++++++++++++ cronie.spec | 33 ++++++-------- sources | 2 +- 4 files changed, 76 insertions(+), 33 deletions(-) create mode 100644 0001-do-no-leak-file-descriptors.patch diff --git a/.gitignore b/.gitignore index 14befbb..29a96bf 100644 --- a/.gitignore +++ b/.gitignore @@ -1,12 +1 @@ -/cronie-1.5.0.tar.gz -/cronie-1.5.1.tar.gz -/cronie-1.5.2.tar.gz -/cronie-1.5.3.tar.gz -/cronie-1.5.4.tar.gz -/cronie-1.5.5.tar.gz -/cronie-1.5.6.tar.gz -/cronie-1.5.7.tar.gz -/cronie-1.6.0.tar.gz -/cronie-1.6.1.tar.gz -/cronie-1.7.0.tar.gz -/cronie-1.7.1.tar.gz +/cronie-*.tar.gz diff --git a/0001-do-no-leak-file-descriptors.patch b/0001-do-no-leak-file-descriptors.patch new file mode 100644 index 0000000..3c81e32 --- /dev/null +++ b/0001-do-no-leak-file-descriptors.patch @@ -0,0 +1,61 @@ +From b3a54d0b3561bc2ab46c11fd5c67350cc216b171 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Jan=20Stan=C4=9Bk?= +Date: Wed, 26 Jun 2024 16:08:44 +0200 +Subject: [PATCH] Do not leak file descriptors in backup_crontab + +Originally, if anything went wrong during the backup, +the early return caused the crontab_file and possibly backup_file +pointers to leak. + +Issue found by static scanner. +--- + src/crontab.c | 18 +++++++++++++----- + 1 file changed, 13 insertions(+), 5 deletions(-) + +diff --git a/src/crontab.c b/src/crontab.c +index f61fd46..55d2aed 100644 +--- a/src/crontab.c ++++ b/src/crontab.c +@@ -563,6 +563,7 @@ static int backup_crontab(const char *crontab_path) { + + if (swap_uids() == -1) { + perror("swapping uids"); ++ (void) fclose(crontab_file); + exit(ERROR_EXIT); + } + +@@ -590,22 +591,29 @@ static int backup_crontab(const char *crontab_path) { + + if (swap_uids_back() < OK) { + perror("swapping uids back"); ++ if (backup_file != NULL) { ++ (void) fclose(backup_file); ++ } ++ (void) fclose(crontab_file); + exit(ERROR_EXIT); + } + + if (retval != 0) +- return retval; ++ goto cleanup; + + if (EOF != ch) + while (EOF != (ch = get_char(crontab_file))) + putc(ch, backup_file); + +- (void) fclose(crontab_file); +- (void) fclose(backup_file); +- + printf("Backup of %s's previous crontab saved to %s\n", User, backup_path); + +- return 0; ++cleanup: ++ if (backup_file != NULL) { ++ (void) fclose(backup_file); ++ } ++ (void) fclose(crontab_file); ++ ++ return retval; + } + + static void check_error(const char *msg) { diff --git a/cronie.spec b/cronie.spec index 6b48080..ce56756 100644 --- a/cronie.spec +++ b/cronie.spec @@ -1,16 +1,17 @@ -%bcond_without selinux -%bcond_without pam -%bcond_without audit -%bcond_without inotify +%bcond selinux 1 +%bcond pam 1 +%bcond audit 1 +%bcond inotify 1 Summary: Cron daemon for executing programs at set times Name: cronie -Version: 1.7.1 +Version: 1.7.2 Release: %autorelease License: GPL-2.0-or-later AND BSD-3-Clause AND BSD-2-Clause AND ISC AND LGPL-2.1-or-later URL: https://github.com/cronie-crond/cronie Source0: https://github.com/cronie-crond/cronie/releases/download/cronie-%{version}/cronie-%{version}.tar.gz +Patch: 0001-do-no-leak-file-descriptors.patch Requires: dailyjobs @@ -81,21 +82,13 @@ extra features. %build %configure \ -%if %{with pam} ---with-pam \ -%endif -%if %{with selinux} ---with-selinux \ -%endif -%if %{with audit} ---with-audit \ -%endif -%if %{with inotify} ---with-inotify \ -%endif ---enable-anacron \ ---enable-pie \ ---enable-relro + %{?with_pam:--with-pam} \ + %{?with_selinux:--with-selinux} \ + %{?with_audit:--with-audit} \ + %{?with_inotify:--with-inotify} \ + --enable-anacron \ + --enable-pie \ + --enable-relro %make_build V=2 diff --git a/sources b/sources index 9c61c48..be7e26e 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (cronie-1.7.1.tar.gz) = 4479f6f05ca9da3ecefa0e9b73662f1db58ffff309916de9f92f89c5e7f93f1c5c744f18cb3e1a3df9664d533afe7dad710f97484e72a314c87d84f57a6c56fb +SHA512 (cronie-1.7.2.tar.gz) = 5b55c677a5b812dbfa70f6ee25e41907e99cc63a4883974c6bb8115ad65155d66665704808c338d2f7be6b0a57028c319f2d1115c69bb5f3efdda1efafd144de From a2b306c77a1d77fdf42c0452a86f998a2c9ec8be Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 17 Jul 2024 20:12:45 +0000 Subject: [PATCH 03/15] Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild From 3efab80e2bb0e5c2214c64b0570d4610d3266457 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Poho=C5=99elsk=C3=BD?= Date: Mon, 9 Dec 2024 16:24:40 +0100 Subject: [PATCH 04/15] Create anacron timestamp files with correct permissions --- cronie.spec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cronie.spec b/cronie.spec index ce56756..f789579 100644 --- a/cronie.spec +++ b/cronie.spec @@ -123,9 +123,9 @@ install -m 644 contrib/cronie.systemd $RPM_BUILD_ROOT/lib/systemd/system/crond.s %systemd_post crond.service %post anacron -[ -e /var/spool/anacron/cron.daily ] || touch /var/spool/anacron/cron.daily 2>/dev/null || : -[ -e /var/spool/anacron/cron.weekly ] || touch /var/spool/anacron/cron.weekly 2>/dev/null || : -[ -e /var/spool/anacron/cron.monthly ] || touch /var/spool/anacron/cron.monthly 2>/dev/null || : +[ -e /var/spool/anacron/cron.daily ] || install -m 0600 -D /dev/null /var/spool/anacron/cron.daily 2>/dev/null || : +[ -e /var/spool/anacron/cron.weekly ] || install -m 0600 -D /dev/null /var/spool/anacron/cron.weekly 2>/dev/null || : +[ -e /var/spool/anacron/cron.monthly ] || install -m 0600 -D /dev/null /var/spool/anacron/cron.monthly 2>/dev/null || : %preun # run before a package is removed From d49463ff024865d9cd717b9cffa2996fb9471626 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 16 Jan 2025 14:52:49 +0000 Subject: [PATCH 05/15] Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild From 7bb78d8b2c37f01821c9206058f496115d27728c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Poho=C5=99elsk=C3=BD?= Date: Mon, 27 Jan 2025 14:46:00 +0100 Subject: [PATCH 06/15] Resolve build failure with GCC15 --- cronie.spec | 2 ++ make_error_func_prototype_complete.patch | 37 ++++++++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 make_error_func_prototype_complete.patch diff --git a/cronie.spec b/cronie.spec index f789579..fe7c096 100644 --- a/cronie.spec +++ b/cronie.spec @@ -12,6 +12,8 @@ URL: https://github.com/cronie-crond/cronie Source0: https://github.com/cronie-crond/cronie/releases/download/cronie-%{version}/cronie-%{version}.tar.gz Patch: 0001-do-no-leak-file-descriptors.patch +# https://github.com/cronie-crond/cronie/issues/193 +Patch: make_error_func_prototype_complete.patch Requires: dailyjobs diff --git a/make_error_func_prototype_complete.patch b/make_error_func_prototype_complete.patch new file mode 100644 index 0000000..1988825 --- /dev/null +++ b/make_error_func_prototype_complete.patch @@ -0,0 +1,37 @@ +From 09c630c654b2aeff06a90a412cce0a60ab4955a4 Mon Sep 17 00:00:00 2001 +From: Tomas Mraz +Date: Mon, 18 Nov 2024 21:02:30 +0100 +Subject: [PATCH] load_entry(): Make error_func prototype complete + +Fixes #193 +--- + src/entry.c | 2 +- + src/funcs.h | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/entry.c b/src/entry.c +index 586eb9d..a2077e8 100644 +--- a/src/entry.c ++++ b/src/entry.c +@@ -90,7 +90,7 @@ void free_entry(entry * e) { + /* return NULL if eof or syntax error occurs; + * otherwise return a pointer to a new entry. + */ +-entry *load_entry(FILE * file, void (*error_func) (), struct passwd *pw, ++entry *load_entry(FILE * file, void (*error_func) (const char *), struct passwd *pw, + char **envp) { + /* this function reads one crontab entry -- the next -- from a file. + * it skips any leading blank lines, ignores comments, and returns +diff --git a/src/funcs.h b/src/funcs.h +index 427e027..f28d634 100644 +--- a/src/funcs.h ++++ b/src/funcs.h +@@ -89,7 +89,7 @@ char *env_get(const char *, char **), + user *load_user(int, struct passwd *, const char *, const char *, const char *), + *find_user(cron_db *, const char *, const char *); + +-entry *load_entry(FILE *, void (*)(), struct passwd *, char **); ++entry *load_entry(FILE *, void (*)(const char *), struct passwd *, char **); + + FILE *cron_popen(char *, const char *, struct passwd *, char **); + From 016dbce14941269d206bc632328ad379cb32e42e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Poho=C5=99elsk=C3=BD?= Date: Mon, 27 Jan 2025 14:59:43 +0100 Subject: [PATCH 07/15] Remove sbin mentions from spec file --- cronie.spec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cronie.spec b/cronie.spec index fe7c096..a6a037e 100644 --- a/cronie.spec +++ b/cronie.spec @@ -155,7 +155,7 @@ exit 0 # The package is allowed to autostart: /bin/systemctl enable crond.service >/dev/null 2>&1 -/sbin/chkconfig --del crond >/dev/null 2>&1 || : +/bin/chkconfig --del crond >/dev/null 2>&1 || : /bin/systemctl try-restart crond.service >/dev/null 2>&1 || : /bin/systemctl daemon-reload >/dev/null 2>&1 || : @@ -168,7 +168,7 @@ exit 0 %doc AUTHORS README ChangeLog %{!?_licensedir:%global license %%doc} %license COPYING -%attr(755,root,root) %{_sbindir}/crond +%attr(755,root,root) %{_bindir}/crond %attr(4755,root,root) %{_bindir}/crontab %attr(755,root,root) %{_bindir}/cronnext %{_mandir}/man8/crond.* @@ -187,7 +187,7 @@ exit 0 %attr(0644,root,root) /lib/systemd/system/crond.service %files anacron -%{_sbindir}/anacron +%{_bindir}/anacron %attr(0755,root,root) %{_sysconfdir}/cron.hourly/0anacron %config(noreplace) %{_sysconfdir}/anacrontab %dir /var/spool/anacron From cecc2437a1b3a2c5156bc5dfcc0a30e330af8356 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Poho=C5=99elsk=C3=BD?= Date: Mon, 7 Apr 2025 18:52:00 +0200 Subject: [PATCH 08/15] Fix range parsing Adds patch from this PR: https://github.com/cronie-crond/cronie/pull/200 --- cronie.spec | 2 ++ fix_range_parsing.patch | 26 ++++++++++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 fix_range_parsing.patch diff --git a/cronie.spec b/cronie.spec index a6a037e..329e3ee 100644 --- a/cronie.spec +++ b/cronie.spec @@ -14,6 +14,8 @@ Source0: https://github.com/cronie-crond/cronie/releases/download/cronie-%{ver Patch: 0001-do-no-leak-file-descriptors.patch # https://github.com/cronie-crond/cronie/issues/193 Patch: make_error_func_prototype_complete.patch +# https://github.com/cronie-crond/cronie/pull/200 +Patch: fix_range_parsing.patch Requires: dailyjobs diff --git a/fix_range_parsing.patch b/fix_range_parsing.patch new file mode 100644 index 0000000..81e07c5 --- /dev/null +++ b/fix_range_parsing.patch @@ -0,0 +1,26 @@ +From d037042129eacdd9d7760d74437842ee5a2d116e Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Ond=C5=99ej=20Poho=C5=99elsk=C3=BD?= +Date: Tue, 11 Mar 2025 15:12:38 +0100 +Subject: [PATCH] get_range() fix range parsing for Sunday as 0 or 7 + +In fc8b0e5, we changed how the ranges are parsed. This created a +regression for parsing Sunday at the end of the range. This commit adds +the logic to correctly handle Sunday as the end of the range. +--- + src/entry.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/src/entry.c b/src/entry.c +index a2077e8..30bedb3 100644 +--- a/src/entry.c ++++ b/src/entry.c +@@ -642,6 +642,9 @@ get_range(bitstr_t * bits, int low, int high, const char *names[], + state = R_FINISH; + break; + } ++ if (low_ > high_ && high_ == 0) { ++ high_ = 7; ++ } + return (EOF); + + case R_RANDOM: From c4ababaa6b628a8b286bae7cd0f621eabae25287 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Poho=C5=99elsk=C3=BD?= Date: Wed, 23 Apr 2025 10:06:35 +0200 Subject: [PATCH 09/15] Install crond.service into /usr/lib The old installation path (bare /lib prefix) is probably a leftover from before the /usr path migration. --- cronie.spec | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/cronie.spec b/cronie.spec index 329e3ee..57f5467 100644 --- a/cronie.spec +++ b/cronie.spec @@ -119,8 +119,7 @@ touch $RPM_BUILD_ROOT/var/spool/anacron/cron.monthly install -m 644 contrib/dailyjobs $RPM_BUILD_ROOT/%{_sysconfdir}/cron.d/dailyjobs # install systemd initscript -mkdir -p $RPM_BUILD_ROOT/lib/systemd/system/ -install -m 644 contrib/cronie.systemd $RPM_BUILD_ROOT/lib/systemd/system/crond.service +install -m 644 -D contrib/cronie.systemd $RPM_BUILD_ROOT/usr/lib/systemd/system/crond.service %post # run after an installation @@ -186,7 +185,7 @@ exit 0 %config(noreplace) %{_sysconfdir}/sysconfig/crond %config(noreplace,missingok) %{_sysconfdir}/cron.deny %attr(0644,root,root) %config(noreplace) %{_sysconfdir}/cron.d/0hourly -%attr(0644,root,root) /lib/systemd/system/crond.service +%attr(0644,root,root) /usr/lib/systemd/system/crond.service %files anacron %{_bindir}/anacron From e32eaecd64e8d6ad94269305e111974928ec4a17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Poho=C5=99elsk=C3=BD?= Date: Tue, 13 May 2025 07:56:02 +0200 Subject: [PATCH 10/15] Move parsing code before separator check --- cronie.spec | 2 ++ move_parsing_code.patch | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 move_parsing_code.patch diff --git a/cronie.spec b/cronie.spec index 57f5467..3280854 100644 --- a/cronie.spec +++ b/cronie.spec @@ -16,6 +16,8 @@ Patch: 0001-do-no-leak-file-descriptors.patch Patch: make_error_func_prototype_complete.patch # https://github.com/cronie-crond/cronie/pull/200 Patch: fix_range_parsing.patch +# https://github.com/cronie-crond/cronie/pull/201 +Patch: move_parsing_code.patch Requires: dailyjobs diff --git a/move_parsing_code.patch b/move_parsing_code.patch new file mode 100644 index 0000000..abb83a0 --- /dev/null +++ b/move_parsing_code.patch @@ -0,0 +1,36 @@ +From e6c2853856c3103a4add4c3673b3306cc21d341e Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Ond=C5=99ej=20Poho=C5=99elsk=C3=BD?= +Date: Wed, 7 May 2025 13:25:19 +0200 +Subject: [PATCH] get_range() move parsing code before separator check + +In the previous commit the parsing fix was added after a separator check +by accident, making it not execute properly. This commit moves it into the +right place. +--- + src/entry.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/src/entry.c b/src/entry.c +index 30bedb3..da1a02c 100644 +--- a/src/entry.c ++++ b/src/entry.c +@@ -638,13 +638,13 @@ get_range(bitstr_t * bits, int low, int high, const char *names[], + state = R_STEP; + break; + } ++ if (low_ > high_ && high_ == 0) { ++ high_ = 7; ++ } + if (is_separator(ch)) { + state = R_FINISH; + break; + } +- if (low_ > high_ && high_ == 0) { +- high_ = 7; +- } + return (EOF); + + case R_RANDOM: +-- +2.49.0 + From 480a306600ff6867772a997ddcee6c9bebd32a91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Poho=C5=99elsk=C3=BD?= Date: Mon, 7 Jul 2025 14:58:11 +0200 Subject: [PATCH 11/15] tests: migrate from STI to TMT Related: https://fedoraproject.org/wiki/Changes/DisableSTI --- .fmf/version | 1 + plans/default.fmf | 5 + .../main.fmf | 13 ++ .../runtest.sh | 1 - .../main.fmf | 14 ++ .../runtest.sh | 5 +- tests/MAILTO-problem-with-anacron/Makefile | 62 ------- tests/MAILTO-problem-with-anacron/PURPOSE | 4 - tests/MAILTO-problem-with-anacron/anacrontab | 5 - tests/MAILTO-problem-with-anacron/runtest.sh | 155 ------------------ tests/Make-crontab-a-PIE/main.fmf | 13 ++ tests/Make-crontab-a-PIE/runtest.sh | 1 - .../main.fmf | 14 ++ .../runtest.sh | 1 - .../main.fmf | 13 ++ .../runtest.sh | 1 - tests/config-parsing-issue/runtest.sh | 1 - .../main.fmf | 14 ++ .../runtest.sh | 1 - tests/crond-is-missing-RELRO-flags/main.fmf | 13 ++ tests/crond-is-missing-RELRO-flags/runtest.sh | 1 - .../main.fmf | 15 ++ .../runtest.sh | 1 - tests/cronie-jobs-environment/Makefile | 63 ------- tests/cronie-jobs-environment/PURPOSE | 3 - tests/cronie-jobs-environment/cron_test.sh | 5 - tests/cronie-jobs-environment/crontab.temp | 12 -- .../libfaketime-0.9.1.tar.gz | Bin 30398 -> 0 bytes tests/cronie-jobs-environment/runtest.sh | 124 -------------- .../main.fmf | 14 ++ .../runtest.sh | 1 - tests/crontab-has-wrong-permissions/main.fmf | 12 ++ .../crontab-has-wrong-permissions/runtest.sh | 1 - tests/echos-OK-twice-in-init-script/main.fmf | 12 ++ .../echos-OK-twice-in-init-script/runtest.sh | 57 +++---- tests/init-script-failure/main.fmf | 12 ++ tests/init-script-failure/runtest.sh | 1 - tests/init-scripts-LSB/main.fmf | 12 ++ tests/init-scripts-LSB/runtest.sh | 3 +- tests/ldap-users/Makefile | 63 ------- tests/ldap-users/PURPOSE | 5 - tests/ldap-users/data.ldif | 26 --- tests/ldap-users/runtest.sh | 133 --------------- tests/ldap-users/slapd.conf | 32 ---- tests/ldap-users/user1.cron | 10 -- .../main.fmf | 14 ++ .../runtest.sh | 1 - tests/run-with-syslog-flag/main.fmf | 13 ++ tests/run-with-syslog-flag/runtest.sh | 1 - tests/tests.yml | 82 --------- .../main.fmf | 12 ++ .../runtest.sh | 3 +- 52 files changed, 246 insertions(+), 835 deletions(-) create mode 100644 .fmf/version create mode 100644 plans/default.fmf create mode 100644 tests/Can-t-remove-crontab-from-expired-accounts/main.fmf mode change 100644 => 100755 tests/Can-t-remove-crontab-from-expired-accounts/runtest.sh create mode 100644 tests/Cron-does-uid-lookups-for-non-existent-users/main.fmf mode change 100644 => 100755 tests/Cron-does-uid-lookups-for-non-existent-users/runtest.sh delete mode 100644 tests/MAILTO-problem-with-anacron/Makefile delete mode 100644 tests/MAILTO-problem-with-anacron/PURPOSE delete mode 100644 tests/MAILTO-problem-with-anacron/anacrontab delete mode 100644 tests/MAILTO-problem-with-anacron/runtest.sh create mode 100644 tests/Make-crontab-a-PIE/main.fmf mode change 100644 => 100755 tests/Make-crontab-a-PIE/runtest.sh create mode 100644 tests/anacron-segfaults-with-certain-config-data-2/main.fmf mode change 100644 => 100755 tests/anacron-segfaults-with-certain-config-data-2/runtest.sh create mode 100644 tests/anacron-segfaults-with-certain-config-data/main.fmf mode change 100644 => 100755 tests/anacron-segfaults-with-certain-config-data/runtest.sh mode change 100644 => 100755 tests/config-parsing-issue/runtest.sh create mode 100644 tests/cron-daemon-fails-to-log-that-it-is-shutting-down/main.fmf mode change 100644 => 100755 tests/cron-daemon-fails-to-log-that-it-is-shutting-down/runtest.sh create mode 100644 tests/crond-is-missing-RELRO-flags/main.fmf mode change 100644 => 100755 tests/crond-is-missing-RELRO-flags/runtest.sh create mode 100644 tests/crond-subtask-abnormal-termination-removes-pid-file-in-error/main.fmf mode change 100644 => 100755 tests/crond-subtask-abnormal-termination-removes-pid-file-in-error/runtest.sh delete mode 100644 tests/cronie-jobs-environment/Makefile delete mode 100644 tests/cronie-jobs-environment/PURPOSE delete mode 100644 tests/cronie-jobs-environment/cron_test.sh delete mode 100644 tests/cronie-jobs-environment/crontab.temp delete mode 100644 tests/cronie-jobs-environment/libfaketime-0.9.1.tar.gz delete mode 100644 tests/cronie-jobs-environment/runtest.sh create mode 100644 tests/crontab-can-invoke-lookup-for-nonexisted-user/main.fmf mode change 100644 => 100755 tests/crontab-can-invoke-lookup-for-nonexisted-user/runtest.sh create mode 100644 tests/crontab-has-wrong-permissions/main.fmf mode change 100644 => 100755 tests/crontab-has-wrong-permissions/runtest.sh create mode 100644 tests/echos-OK-twice-in-init-script/main.fmf mode change 100644 => 100755 tests/echos-OK-twice-in-init-script/runtest.sh create mode 100644 tests/init-script-failure/main.fmf mode change 100644 => 100755 tests/init-script-failure/runtest.sh create mode 100644 tests/init-scripts-LSB/main.fmf mode change 100644 => 100755 tests/init-scripts-LSB/runtest.sh delete mode 100644 tests/ldap-users/Makefile delete mode 100644 tests/ldap-users/PURPOSE delete mode 100644 tests/ldap-users/data.ldif delete mode 100644 tests/ldap-users/runtest.sh delete mode 100644 tests/ldap-users/slapd.conf delete mode 100644 tests/ldap-users/user1.cron create mode 100644 tests/only-one-running-instance-in-time/main.fmf mode change 100644 => 100755 tests/only-one-running-instance-in-time/runtest.sh create mode 100644 tests/run-with-syslog-flag/main.fmf mode change 100644 => 100755 tests/run-with-syslog-flag/runtest.sh delete mode 100644 tests/tests.yml create mode 100644 tests/usr-bin-crontab-has-wrong-permissions/main.fmf mode change 100644 => 100755 tests/usr-bin-crontab-has-wrong-permissions/runtest.sh diff --git a/.fmf/version b/.fmf/version new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/.fmf/version @@ -0,0 +1 @@ +1 diff --git a/plans/default.fmf b/plans/default.fmf new file mode 100644 index 0000000..ad7db18 --- /dev/null +++ b/plans/default.fmf @@ -0,0 +1,5 @@ +summary: Default plan for cronie tests +discover: + how: fmf +execute: + how: tmt diff --git a/tests/Can-t-remove-crontab-from-expired-accounts/main.fmf b/tests/Can-t-remove-crontab-from-expired-accounts/main.fmf new file mode 100644 index 0000000..9fd715a --- /dev/null +++ b/tests/Can-t-remove-crontab-from-expired-accounts/main.fmf @@ -0,0 +1,13 @@ +summary: Test for Can't remove crontab from expired accounts +description: '' +contact: Karel Volny +component: + - cronie +test: ./runtest.sh +framework: beakerlib +recommend: + - cronie +duration: 5m +extra-summary: + /CoreOS/cronie/Regression/Can-t-remove-crontab-from-expired-accounts +extra-task: /CoreOS/cronie/Regression/Can-t-remove-crontab-from-expired-accounts diff --git a/tests/Can-t-remove-crontab-from-expired-accounts/runtest.sh b/tests/Can-t-remove-crontab-from-expired-accounts/runtest.sh old mode 100644 new mode 100755 index 73d8914..9678675 --- a/tests/Can-t-remove-crontab-from-expired-accounts/runtest.sh +++ b/tests/Can-t-remove-crontab-from-expired-accounts/runtest.sh @@ -26,7 +26,6 @@ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # Include Beaker environment -. /usr/bin/rhts-environment.sh || exit 1 . /usr/share/beakerlib/beakerlib.sh || exit 1 PACKAGE="cronie" diff --git a/tests/Cron-does-uid-lookups-for-non-existent-users/main.fmf b/tests/Cron-does-uid-lookups-for-non-existent-users/main.fmf new file mode 100644 index 0000000..eb0af1f --- /dev/null +++ b/tests/Cron-does-uid-lookups-for-non-existent-users/main.fmf @@ -0,0 +1,14 @@ +summary: Test for Cron does uid lookups for non-existent users +description: "Bug summary: Cron does uid lookups for non-existent users\n" +contact: Vaclav Danek +component: + - cronie +test: ./runtest.sh +framework: beakerlib +recommend: + - cronie +duration: 5m +extra-summary: + /CoreOS/cronie/Regression/Cron-does-uid-lookups-for-non-existent-users +extra-task: + /CoreOS/cronie/Regression/Cron-does-uid-lookups-for-non-existent-users diff --git a/tests/Cron-does-uid-lookups-for-non-existent-users/runtest.sh b/tests/Cron-does-uid-lookups-for-non-existent-users/runtest.sh old mode 100644 new mode 100755 index 72329da..69bb9bd --- a/tests/Cron-does-uid-lookups-for-non-existent-users/runtest.sh +++ b/tests/Cron-does-uid-lookups-for-non-existent-users/runtest.sh @@ -26,7 +26,6 @@ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # Include Beaker environment -. /usr/bin/rhts-environment.sh || exit 1 . /usr/share/beakerlib/beakerlib.sh || exit 1 PACKAGE="cronie" @@ -39,8 +38,8 @@ rlJournalStart rlPhaseEnd rlPhaseStartTest - rlRun "sleep 61 | crontab -" 0 - rlRun -s "tail /var/log/cron" 0 + rlRun "sleep 61 | crontab -" 0 "when you run crontab -, it creates a tmp file in /var/spool/cron/" + rlRun -s "tail /var/log/cron" 0,1 "crond should not do uid lookup against the name of the file" rlAssertNotGrep "ORPHAN (no passwd entry)" $rlRun_LOG rm -f $rlRun_LOG rlPhaseEnd diff --git a/tests/MAILTO-problem-with-anacron/Makefile b/tests/MAILTO-problem-with-anacron/Makefile deleted file mode 100644 index cc54f39..0000000 --- a/tests/MAILTO-problem-with-anacron/Makefile +++ /dev/null @@ -1,62 +0,0 @@ -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Makefile of /CoreOS/cronie/Regression/MAILTO-problem-with-anacron -# Description: Test for MAILTO problem with anacron -# Author: Karel Volny -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Copyright (c) 2017 Red Hat, Inc. -# -# This program is free software: you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation, either version 2 of -# the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied -# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -# PURPOSE. See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see http://www.gnu.org/licenses/. -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -export TEST=/CoreOS/cronie/Regression/MAILTO-problem-with-anacron -export TESTVERSION=1.0 - -BUILT_FILES= - -FILES=$(METADATA) runtest.sh Makefile PURPOSE anacrontab - -.PHONY: all install download clean - -run: $(FILES) build - ./runtest.sh - -build: $(BUILT_FILES) - test -x runtest.sh || chmod a+x runtest.sh - -clean: - rm -f *~ $(BUILT_FILES) - - -include /usr/share/rhts/lib/rhts-make.include - -$(METADATA): Makefile - @echo "Owner: Karel Volny " > $(METADATA) - @echo "Name: $(TEST)" >> $(METADATA) - @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) - @echo "Path: $(TEST_DIR)" >> $(METADATA) - @echo "Description: Test for MAILTO problem with anacron" >> $(METADATA) - @echo "Type: Regression" >> $(METADATA) - @echo "TestTime: 15m" >> $(METADATA) - @echo "RunFor: cronie" >> $(METADATA) - @echo "Requires: cronie" >> $(METADATA) - @echo "Priority: Normal" >> $(METADATA) - @echo "License: GPLv2+" >> $(METADATA) - @echo "Confidential: no" >> $(METADATA) - @echo "Destructive: no" >> $(METADATA) - - rhts-lint $(METADATA) diff --git a/tests/MAILTO-problem-with-anacron/PURPOSE b/tests/MAILTO-problem-with-anacron/PURPOSE deleted file mode 100644 index 0eb365c..0000000 --- a/tests/MAILTO-problem-with-anacron/PURPOSE +++ /dev/null @@ -1,4 +0,0 @@ -PURPOSE of /CoreOS/cronie/Regression/MAILTO-problem-with-anacron -Description: Test for MAILTO problem with anacron -Author: Karel Volny -Bug summary: MAILTO problem with anacron diff --git a/tests/MAILTO-problem-with-anacron/anacrontab b/tests/MAILTO-problem-with-anacron/anacrontab deleted file mode 100644 index c672b71..0000000 --- a/tests/MAILTO-problem-with-anacron/anacrontab +++ /dev/null @@ -1,5 +0,0 @@ -SHELL=/bin/sh -PATH=/sbin:/bin:/usr/sbin:/usr/bin -MAILTO=testuser1 - -1 0 test echo "Hello anacron!" diff --git a/tests/MAILTO-problem-with-anacron/runtest.sh b/tests/MAILTO-problem-with-anacron/runtest.sh deleted file mode 100644 index 9504398..0000000 --- a/tests/MAILTO-problem-with-anacron/runtest.sh +++ /dev/null @@ -1,155 +0,0 @@ -#!/bin/bash -# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# runtest.sh of /CoreOS/cronie/Regression/MAILTO-problem-with-anacron -# Description: Test for MAILTO problem with anacron -# Author: Karel Volny -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Copyright (c) 2017 Red Hat, Inc. -# -# This program is free software: you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation, either version 2 of -# the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied -# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -# PURPOSE. See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see http://www.gnu.org/licenses/. -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -# Include Beaker environment -. /usr/bin/rhts-environment.sh || exit 1 -. /usr/share/beakerlib/beakerlib.sh || exit 1 - -PACKAGE="cronie" -TestDir=$PWD - -rlJournalStart - rlPhaseStartSetup - rlAssertRpm $PACKAGE - rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory" - rlRun "pushd $TmpDir" - rlRun "useradd testuser1" 0 "Adding the testing user" - rlFileBackup --clean /var/spool/mail/root /var/log/cron - # stop cron not to interfere with our logs - rlServiceStop crond - rlPhaseEnd - - # email should be sent to user specified via MAILTO (testuser1) - rlPhaseStartTest anacronmail - rlRun "truncate --size 0 /var/spool/mail/testuser1" 0 "Truncating mail queue for the user 'testuser1'" - rlRun "truncate --size 0 /var/log/cron" 0 "Truncating cron log" - # DEBUG - echo "anacrontab:" - echo "***********" - cat ${TestDir}/anacrontab - rlRun "anacron -f -n -d -t ${TestDir}/anacrontab" 0 "Forcing anacron to run job" - sleep 5 - # DEBUG - echo "/var/spool/mail/testuser1:" - echo "**************************" - cat /var/spool/mail/testuser1 - rlAssertGrep "anacron" "/var/spool/mail/testuser1" - rlAssertGrep "To: testuser1" "/var/spool/mail/testuser1" - # DEBUG - echo "/var/log/cron:" - echo "**************" - cat /var/log/cron - rlAssertGrep "\(produced output\)" /var/log/cron - rlAssertNotGrep "not mailing" /var/log/cron -i - rlPhaseEnd - - # email should NOT be sent with empty MAILTO - rlPhaseStartTest noanacronmail-empty - rlRun "truncate --size 0 /var/spool/mail/root" 0 "Truncating mail queue for root" - rlRun "truncate --size 0 /var/log/cron" 0 "Truncating cron log" - rlRun "sed -i -e 's/MAILTO=testuser1/MAILTO=/' ${TestDir}/anacrontab" 0 "Removing mailto user from anacrontab" - # DEBUG - echo "anacrontab:" - echo "***********" - cat ${TestDir}/anacrontab - rlRun "anacron -f -n -d -t ${TestDir}/anacrontab" 0 "Forcing anacron to run job" - sleep 5 - # DEBUG - echo "/var/spool/mail/root:" - echo "*********************" - cat /var/spool/mail/root - rlAssertNotGrep "anacron" "/var/spool/mail/root" - # DEBUG - echo "/var/log/cron:" - echo "**************" - cat /var/log/cron - rlAssertGrep "\(produced output\)" /var/log/cron - rlAssertGrep "not mailing" /var/log/cron -i - rlPhaseEnd - - # email should be sent to nonexisting user double-doublequotes, as the string after '=' is treated literally - rlPhaseStartTest anacronmail-quotes - rlRun "truncate --size 0 /var/spool/mail/root" 0 "Truncating mail queue for root" - rlRun "truncate --size 0 /var/log/cron" 0 "Truncating cron log" - rlRun "sed -i -e 's/MAILTO=/MAILTO=\"\"/' ${TestDir}/anacrontab" 0 "Setting mailto to double quotes in anacrontab" - # DEBUG - echo "anacrontab:" - echo "***********" - cat ${TestDir}/anacrontab - rlRun "anacron -f -n -d -t ${TestDir}/anacrontab" 0 "Forcing anacron to run job" - sleep 5 - # DEBUG - echo "/var/spool/mail/root:" - echo "*********************" - cat /var/spool/mail/root - rlAssertGrep "anacron" "/var/spool/mail/root" - #rlAssertGrep "To: \"\"" "/var/spool/mail/root" - # ^ this doesn't work in Beaker for some reason, check the quotes in 'Received: ... for "";' - rlAssertGrep "for \"\"" "/var/spool/mail/root" - # DEBUG - echo "/var/log/cron:" - echo "**************" - cat /var/log/cron - rlAssertGrep "\(produced output\)" /var/log/cron - rlAssertNotGrep "not mailing" /var/log/cron -i - rlPhaseEnd - - # email should be sent to the user running anacron, when MAILTO is missing - rlPhaseStartTest anacronmail-missing - rlRun "truncate --size 0 /var/spool/mail/root" 0 "Truncating mail queue for root" - rlRun "truncate --size 0 /var/log/cron" 0 "Truncating cron log" - rlRun "sed -i -e '/MAILTO/d' ${TestDir}/anacrontab" 0 "Removing mailto from anacrontab" - # DEBUG - echo "anacrontab:" - echo "***********" - cat ${TestDir}/anacrontab - rlRun "anacron -f -n -d -t ${TestDir}/anacrontab" 0 "Forcing anacron to run job" - sleep 5 - # DEBUG - echo "/var/spool/mail/root:" - echo "*********************" - cat /var/spool/mail/root - rlAssertGrep "anacron" "/var/spool/mail/root" - # DEBUG - echo "/var/log/cron:" - echo "**************" - cat /var/log/cron - rlAssertGrep "\(produced output\)" /var/log/cron - rlAssertNotGrep "not mailing" /var/log/cron -i - rlPhaseEnd - - rlPhaseStartCleanup - rlRun "userdel testuser1" - rlServiceRestore crond - rlFileRestore - rlRun "popd" - rlRun "rm -r $TmpDir" 0 "Removing tmp directory" - #avoid systemd failing to start crond due start-limit - sleep 10 - rlPhaseEnd -rlJournalPrintText -rlJournalEnd diff --git a/tests/Make-crontab-a-PIE/main.fmf b/tests/Make-crontab-a-PIE/main.fmf new file mode 100644 index 0000000..cacd35f --- /dev/null +++ b/tests/Make-crontab-a-PIE/main.fmf @@ -0,0 +1,13 @@ +summary: What the test does +description: '' +contact: Jakub Prokes +component: + - cronie +test: ./runtest.sh +framework: beakerlib +recommend: + - cronie + - elfutils +duration: 5m +extra-summary: /CoreOS/Regression/Make-crontab-a-PIE +extra-task: /CoreOS/Regression/Make-crontab-a-PIE diff --git a/tests/Make-crontab-a-PIE/runtest.sh b/tests/Make-crontab-a-PIE/runtest.sh old mode 100644 new mode 100755 index b0341a1..2b12d50 --- a/tests/Make-crontab-a-PIE/runtest.sh +++ b/tests/Make-crontab-a-PIE/runtest.sh @@ -27,7 +27,6 @@ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # Include Beaker environment -. /usr/bin/rhts-environment.sh || exit 1 . /usr/share/beakerlib/beakerlib.sh || exit 1 PACKAGES="cronie vixie-cron" diff --git a/tests/anacron-segfaults-with-certain-config-data-2/main.fmf b/tests/anacron-segfaults-with-certain-config-data-2/main.fmf new file mode 100644 index 0000000..e3eb557 --- /dev/null +++ b/tests/anacron-segfaults-with-certain-config-data-2/main.fmf @@ -0,0 +1,14 @@ +summary: try some invalid configs for anacron to check config parser +description: '' +contact: Jakub Prokes +component: + - cronie +test: ./runtest.sh +framework: beakerlib +recommend: + - cronie +duration: 5m +extra-summary: + /CoreOS/cronie/Regression/anacron-segfaults-with-certain-config-data-2 +extra-task: + /CoreOS/cronie/Regression/anacron-segfaults-with-certain-config-data-2 diff --git a/tests/anacron-segfaults-with-certain-config-data-2/runtest.sh b/tests/anacron-segfaults-with-certain-config-data-2/runtest.sh old mode 100644 new mode 100755 index bf78c58..e04ec72 --- a/tests/anacron-segfaults-with-certain-config-data-2/runtest.sh +++ b/tests/anacron-segfaults-with-certain-config-data-2/runtest.sh @@ -26,7 +26,6 @@ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # Include Beaker environment -. /usr/bin/rhts-environment.sh || exit 1 . /usr/share/beakerlib/beakerlib.sh || exit 1 assertRpms() { diff --git a/tests/anacron-segfaults-with-certain-config-data/main.fmf b/tests/anacron-segfaults-with-certain-config-data/main.fmf new file mode 100644 index 0000000..8b738de --- /dev/null +++ b/tests/anacron-segfaults-with-certain-config-data/main.fmf @@ -0,0 +1,13 @@ +summary: Test for anacron segfaults with certain config data +description: '' +contact: Robin Hack +component: + - cronie +test: ./runtest.sh +framework: beakerlib +recommend: + - cronie +duration: 20m +extra-summary: + /CoreOS/cronie/Regression/anacron-segfaults-with-certain-config-data +extra-task: /CoreOS/cronie/Regression/anacron-segfaults-with-certain-config-data diff --git a/tests/anacron-segfaults-with-certain-config-data/runtest.sh b/tests/anacron-segfaults-with-certain-config-data/runtest.sh old mode 100644 new mode 100755 index a2d784d..5dca4f2 --- a/tests/anacron-segfaults-with-certain-config-data/runtest.sh +++ b/tests/anacron-segfaults-with-certain-config-data/runtest.sh @@ -26,7 +26,6 @@ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # Include Beaker environment -. /usr/bin/rhts-environment.sh || exit 1 . /usr/share/beakerlib/beakerlib.sh || exit 1 PACKAGE="cronie" diff --git a/tests/config-parsing-issue/runtest.sh b/tests/config-parsing-issue/runtest.sh old mode 100644 new mode 100755 index d95adab..5efb3f2 --- a/tests/config-parsing-issue/runtest.sh +++ b/tests/config-parsing-issue/runtest.sh @@ -26,7 +26,6 @@ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # Include Beaker environment -. /usr/bin/rhts-environment.sh || exit 1 . /usr/share/beakerlib/beakerlib.sh || exit 1 PACKAGE="cronie-anacron" diff --git a/tests/cron-daemon-fails-to-log-that-it-is-shutting-down/main.fmf b/tests/cron-daemon-fails-to-log-that-it-is-shutting-down/main.fmf new file mode 100644 index 0000000..f4f142a --- /dev/null +++ b/tests/cron-daemon-fails-to-log-that-it-is-shutting-down/main.fmf @@ -0,0 +1,14 @@ +summary: Test for cron daemon fails to log that it is shutting down. +description: "Bug summary: cron daemon fails to log that it is shutting down.\n" +contact: Robin Hack +component: + - cronie +test: ./runtest.sh +framework: beakerlib +recommend: + - cronie +duration: 20m +extra-summary: + /CoreOS/cronie/Regression/cron-daemon-fails-to-log-that-it-is-shutting-down +extra-task: + /CoreOS/cronie/Regression/cron-daemon-fails-to-log-that-it-is-shutting-down diff --git a/tests/cron-daemon-fails-to-log-that-it-is-shutting-down/runtest.sh b/tests/cron-daemon-fails-to-log-that-it-is-shutting-down/runtest.sh old mode 100644 new mode 100755 index 0aa147d..e7cb538 --- a/tests/cron-daemon-fails-to-log-that-it-is-shutting-down/runtest.sh +++ b/tests/cron-daemon-fails-to-log-that-it-is-shutting-down/runtest.sh @@ -26,7 +26,6 @@ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # Include Beaker environment -. /usr/bin/rhts-environment.sh || exit 1 . /usr/share/beakerlib/beakerlib.sh || exit 1 PACKAGE="cronie" diff --git a/tests/crond-is-missing-RELRO-flags/main.fmf b/tests/crond-is-missing-RELRO-flags/main.fmf new file mode 100644 index 0000000..3cfcb8f --- /dev/null +++ b/tests/crond-is-missing-RELRO-flags/main.fmf @@ -0,0 +1,13 @@ +summary: Test for crond is missing RELRO flags +description: "Bug summary: crond is missing RELRO flags\n\n" +contact: Martin Cermak +component: + - cronie +test: ./runtest.sh +framework: beakerlib +recommend: + - cronie + - elfutils +duration: 15m +extra-summary: /CoreOS/cronie/Regression/crond-is-missing-RELRO-flags +extra-task: /CoreOS/cronie/Regression/crond-is-missing-RELRO-flags diff --git a/tests/crond-is-missing-RELRO-flags/runtest.sh b/tests/crond-is-missing-RELRO-flags/runtest.sh old mode 100644 new mode 100755 index c6b55df..a394ca6 --- a/tests/crond-is-missing-RELRO-flags/runtest.sh +++ b/tests/crond-is-missing-RELRO-flags/runtest.sh @@ -27,7 +27,6 @@ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # Include rhts environment -. /usr/bin/rhts-environment.sh || exit 1 . /usr/share/beakerlib/beakerlib.sh || exit 1 PACKAGE="cronie" diff --git a/tests/crond-subtask-abnormal-termination-removes-pid-file-in-error/main.fmf b/tests/crond-subtask-abnormal-termination-removes-pid-file-in-error/main.fmf new file mode 100644 index 0000000..f742616 --- /dev/null +++ b/tests/crond-subtask-abnormal-termination-removes-pid-file-in-error/main.fmf @@ -0,0 +1,15 @@ +summary: Test for crond subtask abnormal termination removes pid +description: "Bug summary: crond subtask abnormal termination removes pid file in + error\n" +contact: Robin Hack +component: + - cronie +test: ./runtest.sh +framework: beakerlib +recommend: + - cronie +duration: 20m +extra-summary: + /CoreOS/cronie/Regression/crond-subtask-abnormal-termination-removes-pid-file-in-error +extra-task: + /CoreOS/cronie/Regression/crond-subtask-abnormal-termination-removes-pid-file-in-error diff --git a/tests/crond-subtask-abnormal-termination-removes-pid-file-in-error/runtest.sh b/tests/crond-subtask-abnormal-termination-removes-pid-file-in-error/runtest.sh old mode 100644 new mode 100755 index caaa895..b093ab3 --- a/tests/crond-subtask-abnormal-termination-removes-pid-file-in-error/runtest.sh +++ b/tests/crond-subtask-abnormal-termination-removes-pid-file-in-error/runtest.sh @@ -26,7 +26,6 @@ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # Include Beaker environment -. /usr/bin/rhts-environment.sh || exit 1 . /usr/share/beakerlib/beakerlib.sh || exit 1 PACKAGE="cronie" diff --git a/tests/cronie-jobs-environment/Makefile b/tests/cronie-jobs-environment/Makefile deleted file mode 100644 index c2a43a8..0000000 --- a/tests/cronie-jobs-environment/Makefile +++ /dev/null @@ -1,63 +0,0 @@ -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Makefile of /CoreOS/cronie/Regression/cronie-jobs-environment -# Description: testing EUID with jobs are executed and if LANG is correctly set -# Author: Jakub Prokes -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Copyright (c) 2013 Red Hat, Inc. All rights reserved. -# -# This copyrighted material is made available to anyone wishing -# to use, modify, copy, or redistribute it subject to the terms -# and conditions of the GNU General Public License version 2. -# -# This program is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied -# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -# PURPOSE. See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public -# License along with this program; if not, write to the Free -# Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -# Boston, MA 02110-1301, USA. -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -export TEST=/CoreOS/cronie/Regression/cronie-jobs-environment -export TESTVERSION=1.0 - -BUILT_FILES= - -FILES=$(METADATA) runtest.sh Makefile PURPOSE libfaketime-0.9.1.tar.gz crontab.temp cron_test.sh - -.PHONY: all install download clean - -run: $(FILES) build - ./runtest.sh - -build: $(BUILT_FILES) - test -x runtest.sh || chmod a+x runtest.sh - -clean: - rm -f *~ $(BUILT_FILES) - - -include /usr/share/rhts/lib/rhts-make.include - -$(METADATA): Makefile - @echo "Owner: Jakub Prokes " > $(METADATA) - @echo "Name: $(TEST)" >> $(METADATA) - @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) - @echo "Path: $(TEST_DIR)" >> $(METADATA) - @echo "Description: testing EUID with jobs are executed and if LANG is correctly set" >> $(METADATA) - @echo "Type: Regression" >> $(METADATA) - @echo "TestTime: 10m" >> $(METADATA) - @echo "RunFor: cronie" >> $(METADATA) - @echo "Requires: cronie" >> $(METADATA) - @echo "Priority: Normal" >> $(METADATA) - @echo "License: GPLv2" >> $(METADATA) - @echo "Confidential: no" >> $(METADATA) - @echo "Destructive: no" >> $(METADATA) - - rhts-lint $(METADATA) diff --git a/tests/cronie-jobs-environment/PURPOSE b/tests/cronie-jobs-environment/PURPOSE deleted file mode 100644 index 6ef4539..0000000 --- a/tests/cronie-jobs-environment/PURPOSE +++ /dev/null @@ -1,3 +0,0 @@ -PURPOSE of /CoreOS/cronie/Regression/cronie-jobs-environment -Description: testing EUID with jobs are executed and if LANG is correctly set -Author: Jakub Prokes diff --git a/tests/cronie-jobs-environment/cron_test.sh b/tests/cronie-jobs-environment/cron_test.sh deleted file mode 100644 index 6a82d15..0000000 --- a/tests/cronie-jobs-environment/cron_test.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -printf "LANG=$LANG\n" > /tmp/cronie-jobs-environment.log; -printf "EUID=$EUID\n" >> /tmp/cronie-jobs-environment.log; - diff --git a/tests/cronie-jobs-environment/crontab.temp b/tests/cronie-jobs-environment/crontab.temp deleted file mode 100644 index 643879d..0000000 --- a/tests/cronie-jobs-environment/crontab.temp +++ /dev/null @@ -1,12 +0,0 @@ -# Example of job definition: -# .---------------- minute (0 - 59) -# | .------------- hour (0 - 23) -# | | .---------- day of month (1 - 31) -# | | | .------- month (1 - 12) OR jan,feb,mar,apr ... -# | | | | .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat -# | | | | | -# * * * * * command to be executed - -CRON_CORRECT_MAIL_HEADER=1 - -* * * * * %TMPDIR/cron_test.sh diff --git a/tests/cronie-jobs-environment/libfaketime-0.9.1.tar.gz b/tests/cronie-jobs-environment/libfaketime-0.9.1.tar.gz deleted file mode 100644 index 9913d21746d228d1a6356fb55b6f67ea8f04aebe..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 30398 zcmV+aKLEfViwFo|$Qn-q18iwxW?^e(bZKp6Eif)QE-@~2VR8WMTU&G6xRRb{{0fv` z#;#H{w#Ug_@+8}GtUb2mk>q6jNQscd2}SANtW;r-PW zR_gPMtINxuf6(uL_+R*`Y#9|GCA$3e@^bdq(REn1SbU#J;-mikf8;0K)Bnxr>18nd z^zYUGhpVe&`oH@5^8FR`|KY>cFYhm}K9K(3U;gs`2Yvqk`u`vQ(FcA$4WIR={;)sp zJ?N+B>xaRO#((|cq_6bhpUsOVjM0;PQNBfm(RX>3#Zie3I(m@JyB($9)0!yznkJc^lvrJM^j)$jSNbl^^P;1# zb6e8-$DTgFytp`jck%Q2g?^s&lCg)UckGfn0uvqs1Hyjq(K=VQH|ucB<3WJ{ftw0)MBI!e?0&BR@G zOgQ}WRG4TzOAW1>u8iN_>P24YHJH)Xi-Z1)jZK!BkX^z*b@Uc(^){~xwSY9@d`(a6 zir0f9rVAXGU9GRTU?wYz$b#q+XR$s_W{N1)Pt^=Zs|Uv&cu2C+WU(BztRhIggmUO8 z{k@~;nesHhdxs@!qSIDbMu*ny;0RjFj6znR(dx>=V7erU#Hu!F+LIP-HYqehhqHWG zF{W)gsxh4(Z6Lvnxrwr^&hbv6H$}cIqP2co<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|Wbt<4)Jo4gC@s}<#25LXEt=wU;sN@sjd0Y& z66HyELtqW+Rdh+TBdX?%+kvhGXbk3yBtlb#V}vk4GC$lAQoeWr7EBj3qKmLM^zEze z>4iD=Nc_sZua~Pi+;aG>2*1&76KS_w2Y$H-$3`MBT!D4Vm*VlDT_XK~voFm+h_WL* zfi7TzUTzfASjIV@$$I}k7kGf3w6uUJgaE_6=4m+#6dW4hbvPc9{E3ZfL4uF$o9642 zv)~BU4ShE}sGs6~_acOGv4uf>dkr6a-;O&G%;a}in4}Ey&39%vcwU{6U?;oez39gm zG8=;2HK|x*tx>&r^QsZ-v35*rEMlcxeU55sG*d_0C34hEm#3Xfd!2C{3;hvfCkYuK zKfbdk8N2_9#eK_mj4H0#6E#mw)9B&(j&?0kWzo9|jeHSct~^T$*9jB5tFiNf|};PvHSndSm?8{iwo6{mHRy`dapW~XHLDe7u6 z3F$GxI4U{NMoeV6vwd_Kpc4T%JQoi>ob+v?g=Nwu#)*<$N9iQOY7{eVs+agM$Q;SP?w12kydgr*g^Wxy}p!qZI z>&t`Y@qVL$_mJ8NPIq8NyKfG6&eZ9fv(uBtep&sD*FL%L(R|Fb4rD(GT{VUUk?5KAE5*e?AUgYFmY8DLCh-0+8;Y?+G5R zqB)VISzyduhn5R=Kz5|Dzpr)<8z;G--zg_?zE+T8!*%#Y+h&6Q^Z4_CKlAPX51Ri| zU4t)E_W!lD+N1sdA%5=a$0mPTU_EOoFCFf$bsEige^FdAkr(`1b9_v>VCmxb-e{rU t?1mRTZ{H2Bw}nlVFMdzC;vO#c^6}^K=ke$9=db+v{{Sd^qXYoh0RW$wa?t<) diff --git a/tests/cronie-jobs-environment/runtest.sh b/tests/cronie-jobs-environment/runtest.sh deleted file mode 100644 index c6d83ac..0000000 --- a/tests/cronie-jobs-environment/runtest.sh +++ /dev/null @@ -1,124 +0,0 @@ -#!/bin/bash -# vim: dict=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# runtest.sh of /CoreOS/cronie/Regression/cronie-jobs-environment -# Description: testing EUID with jobs are executed and if LANG is correctly set -# Author: Jakub Prokes -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Copyright (c) 2013 Red Hat, Inc. All rights reserved. -# -# This copyrighted material is made available to anyone wishing -# to use, modify, copy, or redistribute it subject to the terms -# and conditions of the GNU General Public License version 2. -# -# This program is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied -# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -# PURPOSE. See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public -# License along with this program; if not, write to the Free -# Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -# Boston, MA 02110-1301, USA. -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -# Include Beaker environment -. /usr/bin/rhts-environment.sh || exit 1 -. /usr/share/beakerlib/beakerlib.sh || exit 1 - - -## Is nice to know when things going wrong -trap 'errorHandler ${LINENO}' ERR; -function errorHandler() { - local code="${?}"; - local lineNO="$1"; - - case $code in - 127) - rlFail "Command not found on line $lineNO" - ;; - *) - rlFail "Unhandled error $code near line $lineNO"; - ;; - esac -} - -function makeUser() { - local userName="$(tr -dc "[:lower:]" < /dev/urandom | head -c 5 | sed 's/^/qa_/')"; - while getent passwd $userName; do - userName="$(tr -dc "[:lower:]" < /dev/urandom | head -c 5 | sed 's/^/qa_/')"; - done - useradd -d $tmpDir $userName; - echo $userName; -} - - -PACKAGE="cronie" -declare -r LIBFAKETTIMEPACKAGE="libfaketime-0.9.1.tar.gz"; -declare -r LIBFAKETIME="libfaketime.so.1"; - -rlJournalStart - rlPhaseStartSetup "Setup test environment" - rlAssertRpm $PACKAGE - rlRun "tmpDir=\$(mktemp -d)" 0 "Creating tmp directory"; - testDir="$(pwd)"; - rlRun "chmod 755 $tmpDir" 0 "Setting permissions for tmp directory"; - ls -lahdZ $tmpDir; - rlRun "pushd $tmpDir" - testUser="$(makeUser)"; - rlRun "getent passwd $testUser" 0 "Test user $testUser created"; - rlServiceStop crond; - rlPhaseEnd - - rlPhaseStartSetup "Prepare libfaketime"; - rlRun "cp ${testDir}/$LIBFAKETTIMEPACKAGE ./" 0 "Get library sources"; - rlRun "tar -xvzf $LIBFAKETTIMEPACKAGE" 0 "Unpack library sources"; - pushd ${LIBFAKETTIMEPACKAGE%.tar.gz}; - rlRun "make &>/dev/null" 0 "Building library from sources"; - rlRun "cp ./src/$LIBFAKETIME ../" 0 "Coping library to working directory"; - popd; - LD_PRELOAD=./libfaketime.so.1 FAKETIME='1994-07-29 12:00:01' date +%G | { year="$(cat)"; [[ $year -eq 1994 ]]; }; - rlAssert0 "Library preloading working well" $?; - rlPhaseEnd - - rlPhaseStartSetup "Prepare tests"; - rlRun "sed 's#%TMPDIR#$tmpDir#' $testDir/crontab.temp > crontab.source" #0 "Crontab prepared from template"; - rlRun "crontab -u $testUser crontab.source" 0 "Set crontab for test user"; - crontab -lu $testUser; - rlRun "cp $testDir/cron_test.sh ./" 0 "Copyed script for cron job"; - rlRun "chmod a+x cron_test.sh" 0 "Permissions to executed set"; - rlRun "[[ -e /var/spool/mail/$testUser ]] && printf '' > /var/spool/mail/$testUser" 0 "Clean up mails" - rlLog "Execute crond with faked time"; - LD_PRELOAD=./libfaketime.so.1 FAKETIME='@1994-07-29 12:12:50' /usr/sbin/crond -n -x sch & - cronPID=$!; - pstree -Aph - rlRun "kill -0 $cronPID" 0 "crond is running"; - rlLog "Security timeout for 30 sec to ensure all configs are loaded and crontab is succesfully processed"; - sleep 30; - rlPhaseEnd - - rlPhaseStartTest "cronie drops \$LANG and never passes it on to jobs run" - rlRun "[[ $(sed -n '/^LANG/s/LANG=//p' /tmp/cronie-jobs-environment.log) = $LANG ]]" 0 "LANG is set" - rlPhaseEnd - - rlPhaseStartTest "cronie doesn't drop privileges before popen" - rlRun "[[ $(sed -n '/^EUID/s/EUID=//p' /tmp/cronie-jobs-environment.log) -eq $(id -u $testUser) ]]" 0 \ - "Crontab is executed with correct EUID"; - rlPhaseEnd - - rlPhaseStartCleanup - rlRun "kill $cronPID" 0 "Terminating crond" - rlRun "crontab -ru $testUser" 0 "Crontab removed" - rlRun "popd" - rlRun "rm -r $tmpDir" 0 "Removing tmp directory" - rlRun "userdel -rf $testUser"; - rlServiceRestore crond; - #avoid systemd failing to start crond due start-limit - sleep 10 - rlPhaseEnd -rlJournalPrintText -rlJournalEnd diff --git a/tests/crontab-can-invoke-lookup-for-nonexisted-user/main.fmf b/tests/crontab-can-invoke-lookup-for-nonexisted-user/main.fmf new file mode 100644 index 0000000..660a5eb --- /dev/null +++ b/tests/crontab-can-invoke-lookup-for-nonexisted-user/main.fmf @@ -0,0 +1,14 @@ +summary: Test for Cron does uid lookups for non-existent users +description: "Bug summary: Cron does uid lookups for non-existent users\n" +contact: Jakub Prokes +component: + - cronie +test: ./runtest.sh +framework: beakerlib +recommend: + - cronie +duration: 10m +extra-summary: + /CoreOS/cronie/Regression/crontab-can-invoke-lookup-for-nonexisted-user +extra-task: + /CoreOS/cronie/Regression/crontab-can-invoke-lookup-for-nonexisted-user diff --git a/tests/crontab-can-invoke-lookup-for-nonexisted-user/runtest.sh b/tests/crontab-can-invoke-lookup-for-nonexisted-user/runtest.sh old mode 100644 new mode 100755 index 7387dd1..93f9685 --- a/tests/crontab-can-invoke-lookup-for-nonexisted-user/runtest.sh +++ b/tests/crontab-can-invoke-lookup-for-nonexisted-user/runtest.sh @@ -26,7 +26,6 @@ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # Include Beaker environment -. /usr/bin/rhts-environment.sh || exit 1 . /usr/share/beakerlib/beakerlib.sh || exit 1 PACKAGE="cronie" diff --git a/tests/crontab-has-wrong-permissions/main.fmf b/tests/crontab-has-wrong-permissions/main.fmf new file mode 100644 index 0000000..c004b59 --- /dev/null +++ b/tests/crontab-has-wrong-permissions/main.fmf @@ -0,0 +1,12 @@ +summary: What the test does +description: '' +contact: Jakub Prokes +component: + - cronie +test: ./runtest.sh +framework: beakerlib +recommend: + - cronie +duration: 5m +extra-summary: /CoreOS/cronie/Regression/crontab-has-wrong-permissions +extra-task: /CoreOS/cronie/Regression/crontab-has-wrong-permissions diff --git a/tests/crontab-has-wrong-permissions/runtest.sh b/tests/crontab-has-wrong-permissions/runtest.sh old mode 100644 new mode 100755 index 6a72dd2..10358b0 --- a/tests/crontab-has-wrong-permissions/runtest.sh +++ b/tests/crontab-has-wrong-permissions/runtest.sh @@ -27,7 +27,6 @@ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # Include Beaker environment -. /usr/bin/rhts-environment.sh || exit 1 . /usr/share/beakerlib/beakerlib.sh || exit 1 PACKAGES="cronie vixie-cron" diff --git a/tests/echos-OK-twice-in-init-script/main.fmf b/tests/echos-OK-twice-in-init-script/main.fmf new file mode 100644 index 0000000..5779ae2 --- /dev/null +++ b/tests/echos-OK-twice-in-init-script/main.fmf @@ -0,0 +1,12 @@ +summary: Test for echos "OK" twice in init script +description: '' +contact: Martin Cermak +component: + - cronie +test: ./runtest.sh +framework: beakerlib +recommend: + - cronie +duration: 15m +extra-summary: /CoreOS/cronie/Regression/echos-OK-twice-in-init-script +extra-task: /CoreOS/cronie/Regression/echos-OK-twice-in-init-script diff --git a/tests/echos-OK-twice-in-init-script/runtest.sh b/tests/echos-OK-twice-in-init-script/runtest.sh old mode 100644 new mode 100755 index 54afa80..aa4905e --- a/tests/echos-OK-twice-in-init-script/runtest.sh +++ b/tests/echos-OK-twice-in-init-script/runtest.sh @@ -27,50 +27,45 @@ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # Include rhts environment -. /usr/bin/rhts-environment.sh -. /usr/lib/beakerlib/beakerlib.sh +. /usr/share/beakerlib/beakerlib.sh || exit 1 PACKAGE="cronie" +function makeUser() { + local userName="$(tr -dc "[:lower:]" < /dev/urandom | head -c 5 | sed 's/^/qa_/')"; + while getent passwd $userName; do + userName="$(tr -dc "[:lower:]" < /dev/urandom | head -c 5 | sed 's/^/qa_/')"; + done + useradd -d $tmpDir $userName; + echo $userName; +} + rlJournalStart rlPhaseStartSetup rlAssertRpm $PACKAGE - rlRun "TEMPDIR=\`mktemp -d\`" 0 "Creating tmp directory" - rlRun "pushd $TEMPDIR" - - rlFileBackup "/etc/rc.d/init.d/crond" rlServiceStop crond - -cat > /etc/rc.d/init.d/functions2 <> $TEMPDIR/log.txt -} -EOF1 - rlRun "cat /etc/rc.d/init.d/functions2" - - sed -i "s/^\..*$/\0\n\. \/etc\/rc\.d\/init\.d\/functions2/" /etc/rc.d/init.d/crond - rlRun "grep ^\\\. /etc/rc.d/init.d/crond" + rlRun "tmpDir=\$(mktemp -d)" 0 "Creating tmp directory"; + testUser="$(makeUser)"; rlPhaseEnd rlPhaseStartTest - rlAssertNotExists log.txt - rlServiceStart crond - rlAssertExists log.txt - - rlRun "TIMES_PRINTED_OK=`grep OK log.txt | wc -l`" - rlRun "test $TIMES_PRINTED_OK -eq 1" - - rlServiceStop crond + rlRun -s "service crond restart" + rlAssertNotGrep "FAILED" $rlRun_LOG rlPhaseEnd + if ! rpm -q systemd &>/dev/null; then + rlPhaseStartTest + su -l $testUser -c "service crond restart"; + rlAssertEquals "Expected result of call initscript by unprivileged user is 4" $? 4 + rlPhaseEnd + fi + rlPhaseStartCleanup - rlBundleLogs TESTLOGS /etc/rc.d/init.d/functions2 /etc/rc.d/init.d/crond - rlRun "rm -f /etc/rc.d/init.d/functions2" - rlFileRestore + rm -f $rlRun_LOG + rm -rf $tmpDir; + userdel -rf $testUser; rlServiceRestore crond - rlRun "popd" - rlRun "rm -r $TEMPDIR" 0 "Removing tmp directory" - #avoid systemd failing to start crond due start-limit - sleep 10 rlPhaseEnd +rlJournalPrintText rlJournalEnd + diff --git a/tests/init-script-failure/main.fmf b/tests/init-script-failure/main.fmf new file mode 100644 index 0000000..3e708fc --- /dev/null +++ b/tests/init-script-failure/main.fmf @@ -0,0 +1,12 @@ +summary: Testing some init script failures +description: '' +contact: Jakub Prokes +component: + - cronie +test: ./runtest.sh +framework: beakerlib +recommend: + - cronie +duration: 5m +extra-summary: /CoreOS/cronie/Regression/init-script-failure +extra-task: /CoreOS/cronie/Regression/init-script-failure diff --git a/tests/init-script-failure/runtest.sh b/tests/init-script-failure/runtest.sh old mode 100644 new mode 100755 index c0f6d02..3fcc03e --- a/tests/init-script-failure/runtest.sh +++ b/tests/init-script-failure/runtest.sh @@ -27,7 +27,6 @@ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # Include Beaker environment -. /usr/bin/rhts-environment.sh || exit 1 . /usr/share/beakerlib/beakerlib.sh || exit 1 PACKAGE="cronie" diff --git a/tests/init-scripts-LSB/main.fmf b/tests/init-scripts-LSB/main.fmf new file mode 100644 index 0000000..01e8204 --- /dev/null +++ b/tests/init-scripts-LSB/main.fmf @@ -0,0 +1,12 @@ +summary: Init script should meet LSB specifications +description: '' +contact: Petr Sklenar +component: + - cronie +test: ./runtest.sh +framework: shell +recommend: + - cronie +duration: 5m +extra-summary: /CoreOS/cronie/Sanity/init-script-LSB +extra-task: /CoreOS/cronie/Sanity/init-script-LSB diff --git a/tests/init-scripts-LSB/runtest.sh b/tests/init-scripts-LSB/runtest.sh old mode 100644 new mode 100755 index 7b72ea7..63705fb --- a/tests/init-scripts-LSB/runtest.sh +++ b/tests/init-scripts-LSB/runtest.sh @@ -27,8 +27,7 @@ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # Include rhts environment -. /usr/bin/rhts-environment.sh -. /usr/share/rhts-library/rhtslib.sh +. /usr/share/beakerlib/beakerlib.sh || exit 1 PACKAGE="cronie" diff --git a/tests/ldap-users/Makefile b/tests/ldap-users/Makefile deleted file mode 100644 index e1967a1..0000000 --- a/tests/ldap-users/Makefile +++ /dev/null @@ -1,63 +0,0 @@ -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Makefile of /CoreOS/cronie/Regression/ldap-users -# Description: Test for cronie not creating jobs for ldap users if ldap -# Author: Jakub Prokes -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Copyright (c) 2016 Red Hat, Inc. -# -# This program is free software: you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation, either version 2 of -# the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied -# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -# PURPOSE. See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see http://www.gnu.org/licenses/. -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -export TEST=/CoreOS/cronie/Regression/ldap-users -export TESTVERSION=1.0 - -BUILT_FILES= - -FILES=$(METADATA) runtest.sh Makefile PURPOSE data.ldif slapd.conf user1.cron - -.PHONY: all install download clean - -run: $(FILES) build - ./runtest.sh - -build: $(BUILT_FILES) - test -x runtest.sh || chmod a+x runtest.sh - -clean: - rm -f *~ $(BUILT_FILES) - - -include /usr/share/rhts/lib/rhts-make.include - -$(METADATA): Makefile - @echo "Owner: Jakub Prokes " > $(METADATA) - @echo "Name: $(TEST)" >> $(METADATA) - @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) - @echo "Path: $(TEST_DIR)" >> $(METADATA) - @echo "Description: Test for cronie not creating jobs for ldap users if ldap" >> $(METADATA) - @echo "Type: Regression" >> $(METADATA) - @echo "TestTime: 10m" >> $(METADATA) - @echo "RunFor: cronie openldap" >> $(METADATA) - @echo "Requires: cronie authconfig openldap openldap-servers openldap-clients sssd sssd-ldap" >> $(METADATA) - @echo "RhtsRequires: library(authconfig/basic)" >> $(METADATA) - @echo "Priority: Normal" >> $(METADATA) - @echo "License: GPLv2+" >> $(METADATA) - @echo "Confidential: no" >> $(METADATA) - @echo "Destructive: no" >> $(METADATA) - - rhts-lint $(METADATA) diff --git a/tests/ldap-users/PURPOSE b/tests/ldap-users/PURPOSE deleted file mode 100644 index 786822b..0000000 --- a/tests/ldap-users/PURPOSE +++ /dev/null @@ -1,5 +0,0 @@ -PURPOSE of /CoreOS/cronie/Regression/ldap-users -Description: Test for cronie not creating jobs for ldap users if ldap -Author: Jakub Prokes -Bug summary: cronie not creating jobs for ldap users if ldap server is temporarily down. - diff --git a/tests/ldap-users/data.ldif b/tests/ldap-users/data.ldif deleted file mode 100644 index 9d8836a..0000000 --- a/tests/ldap-users/data.ldif +++ /dev/null @@ -1,26 +0,0 @@ -dn: dc=foo,dc=bar,dc=com -dc: foo -objectClass: top -objectClass: domain - -dn: ou=people,dc=foo,dc=bar,dc=com -ou: people -objectClass: top -objectClass: organizationalUnit - -dn: uid=user1,ou=people,dc=foo,dc=bar,dc=com -uid: user1 -cn: user1 -objectClass: account -objectClass: posixAccount -objectClass: top -objectClass: shadowAccount -userPassword: {CRYPT}hebc0ErNA0uXY -shadowLastChange: 14460 -shadowMax: 99999 -shadowWarning: 7 -loginShell: /bin/bash -uidNumber: 1001 -gidNumber: 1000 -homeDirectory: /home/ldap/user1 -gecos: user1 diff --git a/tests/ldap-users/runtest.sh b/tests/ldap-users/runtest.sh deleted file mode 100644 index 4de269b..0000000 --- a/tests/ldap-users/runtest.sh +++ /dev/null @@ -1,133 +0,0 @@ -#!/bin/bash -# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# runtest.sh of /CoreOS/cronie/Regression/ldap-users -# Description: Test for cronie not creating jobs for ldap users if ldap -# Author: Jakub Prokes -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Copyright (c) 2016 Red Hat, Inc. -# -# This program is free software: you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation, either version 2 of -# the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied -# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -# PURPOSE. See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see http://www.gnu.org/licenses/. -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -# Include Beaker environment -. /usr/bin/rhts-environment.sh || exit 1 -. /usr/share/beakerlib/beakerlib.sh || exit 1 - -PACKAGE="cronie" - -rlJournalStart - rlPhaseStart FAIL "General Setup" - rlAssertRpm $PACKAGE - rlRun "tmpDir=\$(mktemp -d)" 0 "Creating tmp directory" - rlRun "testDir=\"$(pwd)\"" - rlRun "pushd $tmpDir" - rlRun "rlImport --all" - rlServiceStart "crond" - rlFileBackup /var/log/cron - echo > /var/log/cron - /bin/kill -HUP $(cat /var/run/syslogd.pid) - rlRun "getent passwd user1" 2 - rlPhaseEnd - - rlPhaseStart FAIL "LDAP Server Setup" - rlServiceStop "slapd" - rlFileBackup --clean "/etc/openldap" - rlFileBackup --clean "/var/run/openldap" - rlFileBackup --clean "/var/lib/ldap" - rlRun "rm -rf /etc/openldap/slapd.d/* /var/lib/ldap/* /var/run/openldap/*" 0 "Cleaning LDAP directories" - rlRun "slapadd -l ${testDir}/data.ldif -f ${testDir}/slapd.conf" 0 "Importing testing user into LDAP" - rlRun "chown ldap:ldap /var/run/openldap/*" 0 "Fixing permissions on '/var/run/openldap/*'" - rlRun "restorecon -Rv /etc/" 0 "Fixing SELinux contexts" - rlRun "slaptest -f ${testDir}/slapd.conf -F /etc/openldap/slapd.d" 0 "Importing LDAP configuration" - rlRun "chown -R ldap:ldap /etc/openldap/slapd.d" 0 "Fixing permissions on '/etc/openldap/slapd.d'" - rlServiceStart "slapd" - rlPhaseEnd - - rlPhaseStart FAIL "LDAP auth setup" - rlServiceStop "sssd" - rlRun "authconfig_setup" - rlRun "authconfig --savebackup=CoreOS_cronie_Regression_ldap-users" - rlRun "authconfig --enableldap --enableldapauth --ldapserver=ldap://127.0.0.1/ \ - --ldapbasedn=dc=foo,dc=bar,dc=com --update" - rlRun "getent passwd user1" - rlRun "mkdir -p /home/ldap/user1" - rlRun "chown user1 /home/ldap/user1" - rlPhaseEnd - - rlPhaseStartTest - rlRun "su user1 -c 'crontab ${testDir}/user1.cron'" 0 "Creating user cronjob" && \ - cat ${testDir}/user1.cron; - rlFileBackup /etc/crontab - rlRun "rlServiceStop slapd" - rlRun "service sssd stop" - rlRun "rm -rf /var/lib/sss/db/*" - rlRun "service sssd start" - rlRun "getent passwd user1" 2 - rlRun "echo \"* * * * * user1 /bin/echo foo > /tmp/cron.out\" > /etc/crontab" 0 \ - "Create record in system crontab" - cat /etc/crontab - rlRun "service crond restart" - rlRun "rlServiceStart slapd" - rlRun "service sssd stop" - rlRun "rm -rf /var/lib/sss/db/*" - rlRun "service sssd start" - waitCounter=60; - echo "Waiting for LDAP" - while ! getent passwd user1; do - sleep 1; - echo -n . - [[ waitCounter -le 0 ]] && break; - waitCounter=$((waitCounter-1)); - done - echo; - rlRun "getent passwd user1" - rm -f /home/ldap/user1/cron.out - echo "Waiting for cronjob execution" - sleep 65; - if rlRun "[[ -f /home/ldap/user1/cron.out ]]" 0 "User cronjob executed successfully"; then - rlAssertGrep "foo" /home/ldap/user1/cron.out; - fi - if rlRun "[[ -f /tmp/cron.out ]]" 0 "Crontab cronjob executed successfully"; then - rlAssertGrep "foo" /tmp/cron.out; - fi - rlRun "service crond stop" - cat /var/log/cron - rlPhaseEnd - - rlPhaseStart WARN "Cleanup" - rlRun "service crond restart" - rlRun "crontab -r -u user1" - rlRun "rlServiceStop slapd" - rlRun "authconfig --disableldap --disableldapauth --update" - rlRun "authconfig --restorebackup=CoreOS_cronie_Regression_ldap-users" - rlRun "authconfig_cleanup" - rlRun "popd" - rlRun "rm -r $tmpDir" 0 "Removing tmp directory" - rlRun "rm -r /home/ldap/user1" - rlRun "rm -r /home/ldap" - rlFileRestore - rlServiceRestore slapd - rlServiceRestore sssd - /bin/kill -HUP $(cat /var/run/syslogd.pid) - rlServiceRestore crond - #avoid systemd failing to start crond due start-limit - sleep 10 - rlPhaseEnd -rlJournalPrintText -rlJournalEnd diff --git a/tests/ldap-users/slapd.conf b/tests/ldap-users/slapd.conf deleted file mode 100644 index 97b3c2d..0000000 --- a/tests/ldap-users/slapd.conf +++ /dev/null @@ -1,32 +0,0 @@ -include /etc/openldap/schema/core.schema -include /etc/openldap/schema/cosine.schema -include /etc/openldap/schema/inetorgperson.schema -include /etc/openldap/schema/nis.schema - -allow bind_v2 - -pidfile /var/run/openldap/slapd.pid -argsfile /var/run/openldap/slapd.args - -database bdb -suffix "dc=foo,dc=bar,dc=com" -rootdn "cn=admin,dc=foo,dc=bar,dc=com" - -# Password is 'x'. -rootpw {SSHA}GPhzu7pTYP4I+nGeujpBkODiPxX0v8n8 - -directory /var/run/openldap/ - -index objectClass eq,pres -index ou,cn,mail,surname,givenname eq,pres,sub -index uidNumber,gidNumber,loginShell eq,pres -index uid,memberUid eq,pres,sub -index nisMapName,nisMapEntry eq,pres,sub -index entryCSN,entryUUID eq - -access to attrs=shadowLastChange,userPassword - by self write - by * auth - -access to * - by * read diff --git a/tests/ldap-users/user1.cron b/tests/ldap-users/user1.cron deleted file mode 100644 index 20d07a4..0000000 --- a/tests/ldap-users/user1.cron +++ /dev/null @@ -1,10 +0,0 @@ -# Example of job definition: -# .---------------- minute (0 - 59) -# | .------------- hour (0 - 23) -# | | .---------- day of month (1 - 31) -# | | | .------- month (1 - 12) OR jan,feb,mar,apr ... -# | | | | .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat -# | | | | | -# * * * * * command to be executed - - * * * * * /bin/echo foo > $HOME/cron.out diff --git a/tests/only-one-running-instance-in-time/main.fmf b/tests/only-one-running-instance-in-time/main.fmf new file mode 100644 index 0000000..0e0cdbd --- /dev/null +++ b/tests/only-one-running-instance-in-time/main.fmf @@ -0,0 +1,14 @@ +summary: When crond is running in multiple instance, then cron jobs are executed + multiple times. Is neccesary to prevent multiple instances of crond running + in time. +description: '' +contact: Jakub Prokes +component: + - cronie +test: ./runtest.sh +framework: beakerlib +recommend: + - cronie +duration: 5m +extra-summary: /CoreOS/cronie/Regression/only-one-running-instance-in-time +extra-task: /CoreOS/cronie/Regression/only-one-running-instance-in-time diff --git a/tests/only-one-running-instance-in-time/runtest.sh b/tests/only-one-running-instance-in-time/runtest.sh old mode 100644 new mode 100755 index 7d7e8cb..8d0a5ed --- a/tests/only-one-running-instance-in-time/runtest.sh +++ b/tests/only-one-running-instance-in-time/runtest.sh @@ -27,7 +27,6 @@ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # Include Beaker environment -. /usr/bin/rhts-environment.sh || exit 1 . /usr/share/beakerlib/beakerlib.sh || exit 1 PACKAGE="cronie" diff --git a/tests/run-with-syslog-flag/main.fmf b/tests/run-with-syslog-flag/main.fmf new file mode 100644 index 0000000..2ac23bc --- /dev/null +++ b/tests/run-with-syslog-flag/main.fmf @@ -0,0 +1,13 @@ +summary: Test for cronie has a bug when run with syslog flag +description: "Bug summary: cronie has a bug when run with syslog flag\n" +contact: Jakub Prokes +component: + - cronie +test: ./runtest.sh +framework: beakerlib +recommend: + - cronie + - rsyslog +duration: 10m +extra-summary: /CoreOS/cronie/Regression/run-with-syslog-flag +extra-task: /CoreOS/cronie/Regression/run-with-syslog-flag diff --git a/tests/run-with-syslog-flag/runtest.sh b/tests/run-with-syslog-flag/runtest.sh old mode 100644 new mode 100755 index 1770208..9f7ce5d --- a/tests/run-with-syslog-flag/runtest.sh +++ b/tests/run-with-syslog-flag/runtest.sh @@ -26,7 +26,6 @@ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # Include Beaker environment -. /usr/bin/rhts-environment.sh || exit 1 . /usr/share/beakerlib/beakerlib.sh || exit 1 PACKAGE="cronie" diff --git a/tests/tests.yml b/tests/tests.yml deleted file mode 100644 index a1167e8..0000000 --- a/tests/tests.yml +++ /dev/null @@ -1,82 +0,0 @@ ---- -# Tests to run in a classic environment -- hosts: localhost - roles: - - role: standard-test-beakerlib - tags: - - classic - tests: - - anacron-segfaults-with-certain-config-data - - anacron-segfaults-with-certain-config-data-2 - - Can-t-remove-crontab-from-expired-accounts - - Cron-does-uid-lookups-for-non-existent-users - - cron-daemon-fails-to-log-that-it-is-shutting-down - - crond-is-missing-RELRO-flags - - crond-subtask-abnormal-termination-removes-pid-file-in-error - - config-parsing-issue - - cronie-jobs-environment - - crontab-can-invoke-lookup-for-nonexisted-user - - crontab-has-wrong-permissions -# - echos-OK-twice-in-init-script Does not work on Fedora-26 - - init-script-failure -# - init-scripts-LSB Does not work on Fedora-26 -# - ldap-users Does not work on Fedora-26 -# - MAILTO-problem-with-anacron Does not work on Fedora-26 - - Make-crontab-a-PIE - - only-one-running-instance-in-time - - run-with-syslog-flag - - usr-bin-crontab-has-wrong-permissions - required_packages: - - authconfig # ldap-users needs this package - - findutils # beakerlib needs find command - - elfutils # crond-is-missing-RELRO-flags needs eu-readelf tool - - gcc # cronie-jobs-environment needs gcc command - - openldap # ldap-users needs this package - - openldap-servers # ldap-users needs this package - - openldap-clients # ldap-users needs this package - - procps-ng # multiple tests need ps and pidof commands - - psmisc # multiple tests need killall command - - rsyslog # run-with-syslog-flag requires this package - - sendmail # MAILTO-problem-with-anacron needs sendmail command - - sssd # ldap-users needs this package - - sssd-ldap # ldap-users needs this package - -# Tests to run in a container environment -- hosts: localhost - roles: - - role: standard-test-beakerlib - tags: - - container - tests: - - Can-t-remove-crontab-from-expired-accounts - - Make-crontab-a-PIE - - config-parsing-issue - - crond-is-missing-RELRO-flags - - crontab-has-wrong-permissions - - usr-bin-crontab-has-wrong-permissions - required_packages: - - cronie # everything needs cronie package - - findutils # beakerlib needs find command - - procps-ng # multiple tests need ps and pidof commands - - psmisc # multiple tests need killall command - - elfutils # multiple tests need eu-readelf tool - -# Tests to run in an Atomic Host VM -- hosts: localhost - roles: - - role: standard-test-beakerlib - tags: - - atomic - tests: - - Can-t-remove-crontab-from-expired-accounts - - Make-crontab-a-PIE - - config-parsing-issue - - crond-is-missing-RELRO-flags - - crontab-has-wrong-permissions - - usr-bin-crontab-has-wrong-permissions - required_packages: - - cronie # everything needs cronie package - - findutils # beakerlib needs find command - - procps-ng # multiple tests need ps and pidof commands - - psmisc # multiple tests need killall command - - elfutils # multiple tests need eu-readelf tool diff --git a/tests/usr-bin-crontab-has-wrong-permissions/main.fmf b/tests/usr-bin-crontab-has-wrong-permissions/main.fmf new file mode 100644 index 0000000..1c345ad --- /dev/null +++ b/tests/usr-bin-crontab-has-wrong-permissions/main.fmf @@ -0,0 +1,12 @@ +summary: Test for /usr/bin/crontab has wrong permissions +description: "Bug summary: /usr/bin/crontab has wrong permissions\n\n" +contact: Martin Cermak +component: + - cronie +test: ./runtest.sh +framework: beakerlib +recommend: + - cronie +duration: 15m +extra-summary: /CoreOS/cronie/Regression/usr-bin-crontab-has-wrong-permissions +extra-task: /CoreOS/cronie/Regression/usr-bin-crontab-has-wrong-permissions diff --git a/tests/usr-bin-crontab-has-wrong-permissions/runtest.sh b/tests/usr-bin-crontab-has-wrong-permissions/runtest.sh old mode 100644 new mode 100755 index 5540876..606dbf0 --- a/tests/usr-bin-crontab-has-wrong-permissions/runtest.sh +++ b/tests/usr-bin-crontab-has-wrong-permissions/runtest.sh @@ -27,8 +27,7 @@ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # Include rhts environment -. /usr/bin/rhts-environment.sh -. /usr/lib/beakerlib/beakerlib.sh +. /usr/share/beakerlib/beakerlib.sh || exit 1 PACKAGE="cronie" From d933913cca4077a658c1fcc9b9a69a6371dc6c42 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 23 Jul 2025 18:50:18 +0000 Subject: [PATCH 12/15] Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild From 05b2e8364bb634f9d1f75da3c9ed09a82ff2dfcf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Poho=C5=99elsk=C3=BD?= Date: Wed, 6 Aug 2025 15:26:33 +0200 Subject: [PATCH 13/15] Fix backup failure when ~/.cache directory is missing --- cronie.spec | 2 ++ crontab-fix-backup-failure.patch | 38 ++++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 crontab-fix-backup-failure.patch diff --git a/cronie.spec b/cronie.spec index 3280854..002f574 100644 --- a/cronie.spec +++ b/cronie.spec @@ -18,6 +18,8 @@ Patch: make_error_func_prototype_complete.patch Patch: fix_range_parsing.patch # https://github.com/cronie-crond/cronie/pull/201 Patch: move_parsing_code.patch +# https://github.com/cronie-crond/cronie/pull/206 +Patch: crontab-fix-backup-failure.patch Requires: dailyjobs diff --git a/crontab-fix-backup-failure.patch b/crontab-fix-backup-failure.patch new file mode 100644 index 0000000..c42554c --- /dev/null +++ b/crontab-fix-backup-failure.patch @@ -0,0 +1,38 @@ +From fd56df9b6d5fa9932edc6bd41d307e2453a6b442 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Ond=C5=99ej=20Poho=C5=99elsk=C3=BD?= +Date: Wed, 30 Jul 2025 12:40:17 +0200 +Subject: [PATCH] crontab: Fix backup failure when ~/.cache directory missing + +Create ~/.cache parent directory before creating ~/.cache/crontab backup +directory to prevent "mkdir: No such file or directory" errors when users +edit crontabs and their cache directory doesn't exist. +--- + src/crontab.c | 14 ++++++++++++++ + 1 file changed, 14 insertions(+) + +diff --git a/src/crontab.c b/src/crontab.c +index c11dc81..14d02dd 100644 +--- a/src/crontab.c ++++ b/src/crontab.c +@@ -578,7 +578,21 @@ static int backup_crontab(const char *crontab_path) { + exit(ERROR_EXIT); + } + ++ /* Ensure the backup directory and its parent exist, creating them if necessary */ + if (stat(backup_dir, &sb) < OK && errno == ENOENT) { ++ char *last_slash = strrchr(backup_dir, '/'); ++ if (last_slash && last_slash != backup_dir) { ++ char parent_dir[MAX_FNAME]; ++ size_t parent_len = last_slash - backup_dir; ++ if (parent_len < sizeof(parent_dir)) { ++ strncpy(parent_dir, backup_dir, parent_len); ++ parent_dir[parent_len] = '\0'; ++ /* Check if parent directory exists before creating */ ++ if (stat(parent_dir, &sb) < OK && errno == ENOENT) { ++ mkdir(parent_dir, 0700); ++ } ++ } ++ } + if (OK != mkdir(backup_dir, 0755)) { + fprintf(stderr, "%s: ", backup_dir); + perror("mkdir"); From 4a2f558b3618af5a3d6f19b3e960aa9ae4dfdfc1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Poho=C5=99elsk=C3=BD?= Date: Mon, 8 Dec 2025 11:41:07 +0100 Subject: [PATCH 14/15] Forward XDG_SESSION_CLASS to PAM for session classification --- cronie.spec | 2 + ...SS-to-PAM-for-session-classification.patch | 70 +++++++++++++++++++ 2 files changed, 72 insertions(+) create mode 100644 forward-XDG_SESSION_CLASS-to-PAM-for-session-classification.patch diff --git a/cronie.spec b/cronie.spec index 002f574..a897985 100644 --- a/cronie.spec +++ b/cronie.spec @@ -20,6 +20,8 @@ Patch: fix_range_parsing.patch Patch: move_parsing_code.patch # https://github.com/cronie-crond/cronie/pull/206 Patch: crontab-fix-backup-failure.patch +# https://github.com/cronie-crond/cronie/pull/210 +Patch: forward-XDG_SESSION_CLASS-to-PAM-for-session-classification.patch Requires: dailyjobs diff --git a/forward-XDG_SESSION_CLASS-to-PAM-for-session-classification.patch b/forward-XDG_SESSION_CLASS-to-PAM-for-session-classification.patch new file mode 100644 index 0000000..20828d1 --- /dev/null +++ b/forward-XDG_SESSION_CLASS-to-PAM-for-session-classification.patch @@ -0,0 +1,70 @@ +From 5f9f16b5663becefdd0dd70df31c0ef5ac36f943 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Ond=C5=99ej=20Poho=C5=99elsk=C3=BD?= +Date: Thu, 27 Nov 2025 14:38:47 +0100 +Subject: [PATCH] Forward XDG_SESSION_CLASS to PAM for session classification + +Allow users to set the XDG_SESSION_CLASS environment variable in their +crontab to control the systemd session class for cron jobs. When set, +this value is forwarded to the PAM environment so that pam_systemd can +use it for session classification (e.g., "background-light"). + +This enables cron jobs to run in lighter-weight sessions that consume +fewer system resources. +--- + man/crontab.5 | 10 ++++++++++ + src/security.c | 21 +++++++++++++++++++++ + 2 files changed, 31 insertions(+) + +diff --git a/man/crontab.5 b/man/crontab.5 +index 68380c6..7487cc5 100644 +--- a/man/crontab.5 ++++ b/man/crontab.5 +@@ -157,6 +157,16 @@ upper limit specified by the variable. The random scaling factor is + determined during the cron daemon startup so it remains constant for + the whole run time of the daemon. + .PP ++The ++.I XDG_SESSION_CLASS ++variable specifies the session class to be used when PAM creates a systemd ++session for the cron job. If set (e.g., to "background-light"), this value ++is forwarded to the PAM environment so that ++.BR pam_systemd (8) ++can use it for session classification. This allows cron jobs to run in ++lighter-weight sessions that consume fewer system resources. This variable ++has no effect if crond was built without PAM support. ++.PP + The format of a cron command is similar to the V7 standard, with a number + of upward-compatible extensions. Each line has five time-and-date fields + followed by a +diff --git a/src/security.c b/src/security.c +index 14a514a..67b6d26 100644 +--- a/src/security.c ++++ b/src/security.c +@@ -131,6 +131,27 @@ int cron_set_job_security_context(entry *e, user *u ATTRIBUTE_UNUSED, + pam_strerror(pamh, ret), 0); + return -1; + } ++ ++ /* Forward XDG_SESSION_CLASS from crontab environment to PAM ++ * so that pam_systemd.so can use it for session classification */ ++#ifdef HAVE_PAM_PUTENV ++ if (pamh != NULL) { ++ char *xdg_session_class = env_get("XDG_SESSION_CLASS", e->envp); ++ if (xdg_session_class != NULL) { ++ char *xdg_session_class_env = NULL; ++ if (asprintf(&xdg_session_class_env, "XDG_SESSION_CLASS=%s", ++ xdg_session_class) >= 0) { ++ ret = pam_putenv(pamh, xdg_session_class_env); ++ if (ret != PAM_SUCCESS) { ++ log_it(e->pwd->pw_name, getpid(), ++ "WARNING: Failed to set XDG_SESSION_CLASS in PAM environment", ++ pam_strerror(pamh, ret), 0); ++ } ++ free(xdg_session_class_env); ++ } ++ } ++ } ++#endif + #endif + + #ifdef WITH_SELINUX From f412c7853badc21c3d04d236dd19c61c636c9120 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Poho=C5=99elsk=C3=BD?= Date: Wed, 17 Dec 2025 12:05:29 +0100 Subject: [PATCH 15/15] Use systemd_tmpfiles to create files in /var directory This is needed so Cronie works as expected in bootc --- cronie-anacron-tmpfiles.conf | 9 +++++++++ cronie-tmpfiles.conf | 4 ++++ cronie.spec | 24 ++++++++++++++---------- 3 files changed, 27 insertions(+), 10 deletions(-) create mode 100644 cronie-anacron-tmpfiles.conf create mode 100644 cronie-tmpfiles.conf diff --git a/cronie-anacron-tmpfiles.conf b/cronie-anacron-tmpfiles.conf new file mode 100644 index 0000000..f8f9dd5 --- /dev/null +++ b/cronie-anacron-tmpfiles.conf @@ -0,0 +1,9 @@ +# systemd-tmpfiles configuration for cronie-anacron + +# Create the anacron spool directory +d /var/spool/anacron 0755 root root - + +# Create anacron timestamp files +f /var/spool/anacron/cron.daily 0600 root root - +f /var/spool/anacron/cron.weekly 0600 root root - +f /var/spool/anacron/cron.monthly 0600 root root - diff --git a/cronie-tmpfiles.conf b/cronie-tmpfiles.conf new file mode 100644 index 0000000..4e6eed2 --- /dev/null +++ b/cronie-tmpfiles.conf @@ -0,0 +1,4 @@ +# systemd-tmpfiles configuration for cronie + +# Create the cron spool directory +d /var/spool/cron 0700 root root - \ No newline at end of file diff --git a/cronie.spec b/cronie.spec index a897985..bc893a3 100644 --- a/cronie.spec +++ b/cronie.spec @@ -10,6 +10,8 @@ Release: %autorelease License: GPL-2.0-or-later AND BSD-3-Clause AND BSD-2-Clause AND ISC AND LGPL-2.1-or-later URL: https://github.com/cronie-crond/cronie Source0: https://github.com/cronie-crond/cronie/releases/download/cronie-%{version}/cronie-%{version}.tar.gz +Source1: cronie-tmpfiles.conf +Source2: cronie-anacron-tmpfiles.conf Patch: 0001-do-no-leak-file-descriptors.patch # https://github.com/cronie-crond/cronie/issues/193 @@ -104,7 +106,6 @@ extra features. %install %make_install DESTMAN=$RPM_BUILD_ROOT%{_mandir} -mkdir -pm700 $RPM_BUILD_ROOT%{_localstatedir}/spool/cron mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/ mkdir -pm755 $RPM_BUILD_ROOT%{_sysconfdir}/cron.d/ %if ! %{with pam} @@ -116,10 +117,6 @@ install -m 644 contrib/anacrontab $RPM_BUILD_ROOT%{_sysconfdir}/anacrontab install -c -m755 contrib/0hourly $RPM_BUILD_ROOT%{_sysconfdir}/cron.d/0hourly mkdir -pm 755 $RPM_BUILD_ROOT%{_sysconfdir}/cron.hourly install -c -m755 contrib/0anacron $RPM_BUILD_ROOT%{_sysconfdir}/cron.hourly/0anacron -mkdir -p $RPM_BUILD_ROOT/var/spool/anacron -touch $RPM_BUILD_ROOT/var/spool/anacron/cron.daily -touch $RPM_BUILD_ROOT/var/spool/anacron/cron.weekly -touch $RPM_BUILD_ROOT/var/spool/anacron/cron.monthly # noanacron package install -m 644 contrib/dailyjobs $RPM_BUILD_ROOT/%{_sysconfdir}/cron.d/dailyjobs @@ -127,14 +124,19 @@ install -m 644 contrib/dailyjobs $RPM_BUILD_ROOT/%{_sysconfdir}/cron.d/dailyjobs # install systemd initscript install -m 644 -D contrib/cronie.systemd $RPM_BUILD_ROOT/usr/lib/systemd/system/crond.service +# install tmpfiles.d configuration for bootc compatibility +install -m 644 -D %{SOURCE1} $RPM_BUILD_ROOT%{_tmpfilesdir}/cronie.conf +install -m 644 -D %{SOURCE2} $RPM_BUILD_ROOT%{_tmpfilesdir}/cronie-anacron.conf + %post # run after an installation %systemd_post crond.service +# create directories via tmpfiles.d for bootc compatibility +systemd-tmpfiles --create %{_tmpfilesdir}/cronie.conf 2>/dev/null || : %post anacron -[ -e /var/spool/anacron/cron.daily ] || install -m 0600 -D /dev/null /var/spool/anacron/cron.daily 2>/dev/null || : -[ -e /var/spool/anacron/cron.weekly ] || install -m 0600 -D /dev/null /var/spool/anacron/cron.weekly 2>/dev/null || : -[ -e /var/spool/anacron/cron.monthly ] || install -m 0600 -D /dev/null /var/spool/anacron/cron.monthly 2>/dev/null || : +# create directories and files via tmpfiles.d for bootc compatibility +systemd-tmpfiles --create %{_tmpfilesdir}/cronie-anacron.conf 2>/dev/null || : %preun # run before a package is removed @@ -183,7 +185,6 @@ exit 0 %{_mandir}/man5/crontab.* %{_mandir}/man1/crontab.* %{_mandir}/man1/cronnext.* -%dir %{_localstatedir}/spool/cron %dir %{_sysconfdir}/cron.d %if %{with pam} %attr(0644,root,root) %config(noreplace) %{_sysconfdir}/pam.d/crond @@ -192,17 +193,20 @@ exit 0 %config(noreplace,missingok) %{_sysconfdir}/cron.deny %attr(0644,root,root) %config(noreplace) %{_sysconfdir}/cron.d/0hourly %attr(0644,root,root) /usr/lib/systemd/system/crond.service +%{_tmpfilesdir}/cronie.conf +%ghost %dir %attr(0700,root,root) %{_localstatedir}/spool/cron %files anacron %{_bindir}/anacron %attr(0755,root,root) %{_sysconfdir}/cron.hourly/0anacron %config(noreplace) %{_sysconfdir}/anacrontab -%dir /var/spool/anacron +%ghost %dir %attr(0755,root,root) /var/spool/anacron %ghost %attr(0600,root,root) %verify(not md5 size mtime) /var/spool/anacron/cron.daily %ghost %attr(0600,root,root) %verify(not md5 size mtime) /var/spool/anacron/cron.weekly %ghost %attr(0600,root,root) %verify(not md5 size mtime) /var/spool/anacron/cron.monthly %{_mandir}/man5/anacrontab.* %{_mandir}/man8/anacron.* +%{_tmpfilesdir}/cronie-anacron.conf %files noanacron %attr(0644,root,root) %config(noreplace) %{_sysconfdir}/cron.d/dailyjobs