Accepting request 1170688 from home:smolsheep:upgrades

- Remove safe-backup-permissions.patch -- Merged upstream
- Update to 1.7.2:
  * crond: Revert setting the return path to <>. It is not RFC
    compliant.
  * crond: Inherit MAILFROM from the crond process environment.

OBS-URL: https://build.opensuse.org/request/show/1170688
OBS-URL: https://build.opensuse.org/package/show/Base:System/cronie?expand=0&rev=222
This commit is contained in:
Danilo Spinella 2024-04-30 11:50:54 +00:00 committed by Git OBS Bridge
parent a4bc57d2e4
commit 1266baa0cd
5 changed files with 13 additions and 38 deletions

View File

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

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

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

View File

@ -1,3 +1,12 @@
-------------------------------------------------------------------
Mon Apr 29 07:40:14 UTC 2024 - Joshua Smith <smolsheep@opensuse.org>
- Remove safe-backup-permissions.patch -- Merged upstream
- Update to 1.7.2:
* crond: Revert setting the return path to <>. It is not RFC
compliant.
* crond: Inherit MAILFROM from the crond process environment.
-------------------------------------------------------------------
Mon Feb 26 10:51:55 UTC 2024 - Dominique Leuenberger <dimstar@opensuse.org>

View File

@ -22,7 +22,7 @@
%define _fillupdir %{_localstatedir}/adm/fillup-templates
%endif
Name: cronie
Version: 1.7.1
Version: 1.7.2
Release: 0
Summary: Cron Daemon
License: BSD-3-Clause AND GPL-2.0-only AND MIT
@ -48,8 +48,6 @@ Patch5: cronie-crond_pid.diff
Patch13: fix-manpage-replace-anacrontab-with-crontab.patch
# PATCH-FEATURE-OPENSUSE user common-session-nonlogin
Patch14: cronie-pam_config-nonlogin.diff
# PATCH-FIX-UPSTREAM jsegitz@suse.de https://github.com/cronie-crond/cronie/pull/172
Patch16: safe-backup-permissions.patch
BuildRequires: audit-devel
BuildRequires: autoconf
BuildRequires: automake
@ -111,7 +109,6 @@ cp %{SOURCE7} ./cron_to_cronie.README
%if 0%{?suse_version} > 1500
%patch -P 14 -p1
%endif
%patch -P 16 -p1
%build
# fill macro CRON_VERSION it is used in top three lines of crontab file,should be reworked

View File

@ -1,31 +0,0 @@
Index: cronie-cronie-1.7.0/src/crontab.c
===================================================================
--- cronie-cronie-1.7.0.orig/src/crontab.c
+++ cronie-cronie-1.7.0/src/crontab.c
@@ -520,6 +520,7 @@ static int backup_crontab(const char *cr
FILE *backup_file;
struct stat sb;
int retval = 0;
+ mode_t old_umask;
/* create backup directory */
if ((env_value = getenv("XDG_CACHE_HOME")) != NULL) {
@@ -590,6 +591,9 @@ static int backup_crontab(const char *cr
}
}
+ // ensure backup file has strict permssions. Crontabs are not readable for
+ // other users and might contain sensitive information
+ old_umask = umask(0077);
if ((backup_file = fopen(backup_path, "w+")) == NULL) {
fprintf(stderr, "Failed to write to the backup file: ");
perror(backup_path);
@@ -598,6 +602,8 @@ static int backup_crontab(const char *cr
}
swapback:
+ umask(old_umask);
+
if (swap_uids_back() < OK) {
perror("swapping uids back");
exit(ERROR_EXIT);