summaryrefslogtreecommitdiff
path: root/sys-process/vixie-cron
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2019-09-13 17:56:30 +0100
committerV3n3RiX <venerix@redcorelinux.org>2019-09-13 17:56:30 +0100
commit948d557b4a61dc14722668b6b11a4cf3cee07b01 (patch)
treeb28b6cb077ae6b2457e30d49028fc978d8e2b59b /sys-process/vixie-cron
parente3cf2c86fca1750343c1885311f857f185ee4f2d (diff)
gentoo resync : 13.09.2019
Diffstat (limited to 'sys-process/vixie-cron')
-rw-r--r--sys-process/vixie-cron/Manifest2
-rw-r--r--sys-process/vixie-cron/files/vixie-cron-4.1-selinux-1.diff144
-rw-r--r--sys-process/vixie-cron/vixie-cron-4.1-r14.ebuild126
3 files changed, 0 insertions, 272 deletions
diff --git a/sys-process/vixie-cron/Manifest b/sys-process/vixie-cron/Manifest
index 1b5a17ddbde0..cc7d55677c4f 100644
--- a/sys-process/vixie-cron/Manifest
+++ b/sys-process/vixie-cron/Manifest
@@ -8,13 +8,11 @@ AUX vixie-cron-4.1-cron.deny 148 BLAKE2B 3da92c65667ccacd74e32443e1cd5623d8040a7
AUX vixie-cron-4.1-crontabrace.patch 658 BLAKE2B 4958e13b14519b484b677a7fd7593f2b17adbbb7cac46d18e0cd68714841e50614d472cdb880ce7f45e456ba30b9119671c44c217edfa81679d5a231bab8be30 SHA512 7aac74563a26bc86bb99488ab0a556a389b5a3d36bed7c80c355a3504d9175d1ac8d437ebdba60831de42a1cc7188b464956f8e94876f8eaf465c9f7005b8242
AUX vixie-cron-4.1-hardlink.patch 369 BLAKE2B a1e3f1106ca15411b59ebb0a162181675189ae9c459169b01893ffc33cd6ca2b256eaee043c48d841cb8ee8789414ebaf7d153f5a600190d6c8b096c2d06fbd9 SHA512 32a804929f1a005edbe58c17e5a4e57141e1b379724e1d760729ba2e5f578b9e509e5e04893e648f463dc250804a9b6303b3dfb7d91c485e57ac02e1c866600a
AUX vixie-cron-4.1-pam.patch 1714 BLAKE2B 04d3b0f76b794e357b8d93f2a95a45f64f9f6baddd92901626f8cad96d9a6033802727d5d54bc3983acf3073b0e860228567f1a6894021c260222de22d99c880 SHA512 596e3888c9ba484b5e4f2b0db14aac0449760d9e4ca91105cac19555c4e45ae96c9e5e302335c5559697881286eae98d7149742e4f01102cc5042edf795d46fc
-AUX vixie-cron-4.1-selinux-1.diff 4658 BLAKE2B de680ec7292d1ddb8380c2c315ce1e6a33e78388b73a354d7ddecab8b8b969c0a17da19b862069246014afd47761d055fe6d69939f02f658769bd5a2212d8d01 SHA512 aa226982ace71b951d46af7777c173c8c4a1dcb4fc5967fa7396cbe617a7c341add25cfbf6210aa99ab8f1af9773d55fc57985f396a827b75acca12dd542dc54
AUX vixie-cron-4.1-selinux-2.patch 6566 BLAKE2B 21aec85c6ca39e6479252f34d7f8e557fbbc191d8336d056c37a41f487f8c417dea827e3f608f9c605960431583db0453db024f4bbe329a89b81661c5eba641f SHA512 b272b8a9dda7b80f6213ce7b0b38dc3beb16bf38ae202410c9062ae0c14653174dc309fe6dffa469058acf58fae903e0eb670b721213bbdcba3bf21eccfbdfd3
AUX vixie-cron-4.1-setuid_check.patch 767 BLAKE2B b14d22d7a457fd984a65b32bacd30f6f4a01b6670f486d3529a28afd2f880791e0995043066035870e0221b9ae66af68f7134081ec25d18f4757249bd7119784 SHA512 4c49ac5465a142a49799ce1ab816aacd458b44287a3200d9dc35afe1b717d095b2db93eee70913c3c6ee4171afe1293d6838af3f0e6156a96e1e6431ded2af70
AUX vixie-cron.rc7 239 BLAKE2B 64248f4d67ba35ae9c4cbcc9f800782a4da9c0b8780b326cf97d8800cd606cb449ab1725b68d98879d1e33db7552b090ca458fe2ba10f86d360130e65563945f SHA512 d491ae5db8e6ad00bf59380a3358577dfe45a0d137fa5100c22252b8d6d84149d379aae860a30b39c4bdbfc0274ed6cf8fe8d2dfedbea29f4260d5aaab975766
AUX vixie-cron.service 178 BLAKE2B 2ef614075505ef9a48b89ae46d21c5c3544db711b430eabc04870b436437d9b194963b6da572c3bf2c758c4fc7aa37ee90500a1e72fc135ecb8a59f7582ebbba SHA512 09af14c9010c55c204db8755872df531d0e28b473d56f0b5f99c037e2183e2f9e2be9cc66895f4da2036b74efa7bc472e932331fac13722a505ae2be400a068d
DIST vixie-cron-4.1-gentoo-r4.patch.bz2 4204 BLAKE2B 1e276ade20e61ae17e45c10145532e3f32dfa74e32b6cbecde22863de82afb280e97d3b380626451524cfc7fc0663934657509b228a51b3b5ad42e26e5cceb3d SHA512 eec8f89a97927a3557bd1350ed7e9baa0ec133e2c49f8f0fbf51adf62c377451dc48867ca6affcc7576833a5b6b749613c9b99641b1b658853f91d8071c3411b
DIST vixie-cron-4.1.tar.bz2 54246 BLAKE2B 920bf5d95b24cd41677f4a748da02231ed75713ff280acafdf476ad0a71e73068bbad9070fc57d3b0cb39a9539da24182aa2dbc9eb9dfe241adaf9a46f9c5db2 SHA512 1db9a246243dbd4934438ce70bf022215ccffed4b899a77b076d5a7679a7b98a23ef67344e329fc7a836df90685581e10b1c95709db40601c33d2052ce561e04
-EBUILD vixie-cron-4.1-r14.ebuild 3489 BLAKE2B bce170b850ca7446bbb7bb58ed0de15fcac1c4d34c9c5395078978bd5ee58495c753cfa69244065e952c3dc9e4320cfb0f2f8049b30340fa8a22da08fc7877d8 SHA512 2b71cca48dc0bf4075de8db96ccafbd585ecca4987854a50a50816ab188ab9c1fed140707962e564b5a6bdf470e395272befca724c833639f6c8eddbdfd12cf5
EBUILD vixie-cron-4.1-r15.ebuild 3487 BLAKE2B a6c3d77988b303c818458e3d8745b5019493e45235fe1b530968c219be95bc473e496ceaf0413e4db85bf832c14b3481d8291a819c472be0634b172d8c1dbc2c SHA512 84fd99d5dea56b6beb2edb5704b39c64257f94569c1276b0ea1392acdd2d51c17da2f2a5211300d17d3c3e97af84f248522b83a23ba98f1bea509ab30a5fefd4
MISC metadata.xml 167 BLAKE2B e4dadf27fd344484f2bccb5b904909c89aac568c32e5b3c44bdf139eacefd4b4fae74419f503d2b7da0dccc1b68ba05d777d11292c0f89270d1ac5c9c703e8ca SHA512 7c8decb24ee3a850e38186cf3c7f8933a28017426806870ad6ef9ceb2533be147a2681fc789b535a81cb528af8c29d90d3006e4f250aee23bd7dea4561294e33
diff --git a/sys-process/vixie-cron/files/vixie-cron-4.1-selinux-1.diff b/sys-process/vixie-cron/files/vixie-cron-4.1-selinux-1.diff
deleted file mode 100644
index ec2493e8c3ca..000000000000
--- a/sys-process/vixie-cron/files/vixie-cron-4.1-selinux-1.diff
+++ /dev/null
@@ -1,144 +0,0 @@
-diff -purN vixie-cron-4.1.orig/Makefile vixie-cron-4.1/Makefile
---- vixie-cron-4.1.orig/Makefile 2004-08-27 14:09:33.000000000 -0400
-+++ vixie-cron-4.1/Makefile 2008-08-25 15:17:20.062720415 -0400
-@@ -68,7 +68,8 @@ LINTFLAGS = -hbxa $(INCLUDE) $(DEBUGGING
- #<<want to use a nonstandard CC?>>
- CC = gcc -Wall -Wno-unused -Wno-comment
- #<<manifest defines>>
--DEFS =
-+DEFS = -s -DWITH_SELINUX
-+LIBS += -lselinux
- #(SGI IRIX systems need this)
- #DEFS = -D_BSD_SIGNALS -Dconst=
- #<<the name of the BSD-like install program>>
-diff -purN vixie-cron-4.1.orig/database.c vixie-cron-4.1/database.c
---- vixie-cron-4.1.orig/database.c 2004-08-27 14:09:34.000000000 -0400
-+++ vixie-cron-4.1/database.c 2008-08-27 08:19:37.948930858 -0400
-@@ -28,6 +28,16 @@ static char rcsid[] = "# $Id$
-
- #include "cron.h"
-
-+#ifdef WITH_SELINUX
-+#include <selinux/selinux.h>
-+#include <selinux/flask.h>
-+#include <selinux/av_permissions.h>
-+#include <selinux/get_context_list.h>
-+#define SYSUSERNAME "system_u"
-+#else
-+#define SYSUSERNAME "*system*"
-+#endif
-+
- #define TMAX(a,b) ((a)>(b)?(a):(b))
-
- static void process_crontab(const char *, const char *,
-@@ -183,7 +193,7 @@ process_crontab(const char *uname, const
- if (fname == NULL) {
- /* must be set to something for logging purposes.
- */
-- fname = "*system*";
-+ fname = SYSUSERNAME;
- } else if ((pw = getpwnam(uname)) == NULL) {
- /* file doesn't have a user in passwd file.
- */
-@@ -245,6 +255,56 @@ process_crontab(const char *uname, const
- free_user(u);
- log_it(fname, getpid(), "RELOAD", tabname);
- }
-+#ifdef WITH_SELINUX
-+ if (is_selinux_enabled()) {
-+ security_context_t file_context=NULL;
-+ security_context_t user_context=NULL;
-+ struct av_decision avd;
-+ int retval=0;
-+ char *seuser=NULL;
-+ char *level=NULL;
-+
-+ if (fgetfilecon(crontab_fd, &file_context) < OK) {
-+ log_it(fname, getpid(), "getfilecon FAILED", tabname);
-+ goto next_crontab;
-+ }
-+
-+ /*
-+ * Since crontab files are not directly executed,
-+ * crond must ensure that the crontab file has
-+ * a context that is appropriate for the context of
-+ * the user cron job. It performs an entrypoint
-+ * permission check for this purpose.
-+ */
-+ if (getseuserbyname(fname, &seuser, &level) < 0) {
-+ log_it(fname, getpid(), "NO SEUSER", tabname);
-+ goto next_crontab;
-+ }
-+
-+ if (get_default_context_with_level(seuser, level, NULL, &user_context) < 0) {
-+ log_it(fname, getpid(), "NO CONTEXT", tabname);
-+ freecon(file_context);
-+ free(seuser);
-+ free(level);
-+ goto next_crontab;
-+ }
-+
-+ retval = security_compute_av(user_context,
-+ file_context,
-+ SECCLASS_FILE,
-+ FILE__ENTRYPOINT,
-+ &avd);
-+ freecon(user_context);
-+ freecon(file_context);
-+ free(seuser);
-+ free(level);
-+
-+ if (retval || ((FILE__ENTRYPOINT & avd.allowed) != FILE__ENTRYPOINT)) {
-+ log_it(fname, getpid(), "ENTRYPOINT FAILED", tabname);
-+ goto next_crontab;
-+ }
-+ }
-+#endif
- u = load_user(crontab_fd, pw, fname);
- if (u != NULL) {
- u->mtime = statbuf->st_mtime;
-diff -purN vixie-cron-4.1.orig/do_command.c vixie-cron-4.1/do_command.c
---- vixie-cron-4.1.orig/do_command.c 2004-08-27 14:09:34.000000000 -0400
-+++ vixie-cron-4.1/do_command.c 2008-08-25 15:43:43.289174371 -0400
-@@ -25,6 +25,11 @@ static char rcsid[] = "# $Id$
-
- #include "cron.h"
-
-+#ifdef WITH_SELINUX
-+#include <selinux/selinux.h>
-+#include <selinux/get_context_list.h>
-+#endif
-+
- static void child_process(entry *, user *);
- static int safe_p(const char *, const char *);
-
-@@ -265,6 +270,29 @@ child_process(entry *e, user *u) {
- _exit(OK_EXIT);
- }
- # endif /*DEBUGGING*/
-+#ifdef WITH_SELINUX
-+ if (is_selinux_enabled()) {
-+ char *seuser=NULL;
-+ char *level=NULL;
-+ security_context_t scontext;
-+
-+ if (getseuserbyname(u->name, &seuser, &level) < 0) {
-+ fprintf(stderr, "getseuserbyname: Could not determine seuser for user %s\n", u->name);
-+ _exit(ERROR_EXIT);
-+ }
-+ if (get_default_context_with_level(seuser, level, NULL, &scontext) < 0) {
-+ fprintf(stderr, "get_default_context_with_level: could not get security context for user %s, seuser %s\n", u->name, seuser);
-+ _exit(ERROR_EXIT);
-+ }
-+ if (setexeccon(scontext) < 0) {
-+ fprintf(stderr, "setexeccon: Could not set exec context to %s for user %s\n", scontext, u->name);
-+ _exit(ERROR_EXIT);
-+ }
-+ free(seuser);
-+ free(level);
-+ freecon(scontext);
-+ }
-+#endif
- execle(shell, shell, "-c", e->cmd, (char *)0, e->envp);
- fprintf(stderr, "execl: couldn't exec `%s'\n", shell);
- perror("execl");
diff --git a/sys-process/vixie-cron/vixie-cron-4.1-r14.ebuild b/sys-process/vixie-cron/vixie-cron-4.1-r14.ebuild
deleted file mode 100644
index 09604bb30746..000000000000
--- a/sys-process/vixie-cron/vixie-cron-4.1-r14.ebuild
+++ /dev/null
@@ -1,126 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=0
-
-inherit cron toolchain-funcs pam eutils flag-o-matic user systemd
-
-# no useful homepage, bug #65898
-HOMEPAGE="ftp://ftp.isc.org/isc/cron/"
-DESCRIPTION="Paul Vixie's cron daemon, a fully featured crond implementation"
-
-SELINUX_PATCH="${P}-selinux-1.diff"
-GENTOO_PATCH_REV="r4"
-
-SRC_URI="mirror://gentoo/${P}.tar.bz2
- mirror://gentoo/${P}-gentoo-${GENTOO_PATCH_REV}.patch.bz2"
-
-LICENSE="ISC BSD-2 BSD"
-KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~x86-fbsd"
-IUSE="selinux pam debug"
-
-DEPEND="selinux? ( sys-libs/libselinux )
- pam? ( virtual/pam )"
-
-RDEPEND="selinux? ( sys-libs/libselinux )
- pam? ( virtual/pam )"
-
-#vixie-cron supports /etc/crontab
-CRON_SYSTEM_CRONTAB="yes"
-
-pkg_setup() {
- enewgroup crontab
-}
-
-src_unpack() {
- unpack ${A}
- cd "${S}"
-
- epatch "${WORKDIR}"/${P}-gentoo-${GENTOO_PATCH_REV}.patch
- epatch "${FILESDIR}"/crontab.5.diff
- epatch "${FILESDIR}"/${P}-commandline.patch
- epatch "${FILESDIR}"/${P}-basename.diff
- epatch "${FILESDIR}"/${P}-setuid_check.patch
- epatch "${FILESDIR}"/${P}-hardlink.patch
- epatch "${FILESDIR}"/${P}-crontabrace.patch
- use pam && epatch "${FILESDIR}"/${P}-pam.patch
- use selinux && epatch "${FILESDIR}"/${SELINUX_PATCH}
-}
-
-src_compile() {
- use debug && append-flags -DDEBUGGING
-
- sed -i -e "s:gcc \(-Wall.*\):$(tc-getCC) \1 ${CFLAGS}:" \
- -e "s:^\(LDFLAGS[ \t]\+=\).*:\1 ${LDFLAGS}:" Makefile \
- || die "sed Makefile failed"
-
- emake || die "emake failed"
-}
-
-src_install() {
- docrondir -m 1730 -o root -g crontab
- docron
- docrontab -m 2755 -o root -g crontab
-
- # /etc stuff
- insinto /etc
- newins "${FILESDIR}"/crontab-3.0.1-r4 crontab
- newins "${FILESDIR}"/${P}-cron.deny cron.deny
-
- keepdir /etc/cron.d
- newpamd "${FILESDIR}"/pamd.compatible cron
- newinitd "${FILESDIR}"/vixie-cron.rc7 vixie-cron
-
- # doc stuff
- doman crontab.1 crontab.5 cron.8
- dodoc "${FILESDIR}"/crontab
- dodoc CHANGES CONVERSION FEATURES MAIL README THANKS
-
- systemd_dounit "${FILESDIR}/${PN}.service"
-}
-
-pkg_preinst() {
- has_version "<${CATEGORY}/${PN}-4.1-r10"
- fix_spool_dir_perms=$?
-}
-
-pkg_postinst() {
- if [[ -f ${ROOT}/etc/init.d/vcron ]]
- then
- ewarn "Please run:"
- ewarn "rc-update del vcron"
- ewarn "rc-update add vixie-cron default"
- fi
-
- # bug 71326
- if [[ -u ${ROOT}/etc/pam.d/cron ]] ; then
- echo
- ewarn "Warning: previous ebuilds didn't reset permissions prior"
- ewarn "to installing crontab, resulting in /etc/pam.d/cron being"
- ewarn "installed with the SUID and executable bits set."
- ewarn
- ewarn "Run the following as root to set the proper permissions:"
- ewarn " chmod 0644 /etc/pam.d/cron"
- echo
- fi
-
- # bug 164466
- if [[ $fix_spool_dir_perms = 0 ]] ; then
- echo
- ewarn "Previous ebuilds didn't correctly set permissions on"
- ewarn "the crontabs spool directory. Proper permissions are"
- ewarn "now being set on ${ROOT}var/spool/cron/crontabs/"
- ewarn "Look at this directory if you have a specific configuration"
- ewarn "that needs special ownerships or permissions."
- echo
- chmod 1730 "${ROOT}/var/spool/cron/crontabs" || die "chmod failed"
- chgrp -R crontab "${ROOT}/var/spool/cron/crontabs" || die "chgrp failed"
- cd "${ROOT}/var/spool/cron/crontabs/"
- for cronfile in * ; do
- [[ ! -f $cronfile ]] || chown "$cronfile:crontab" "$cronfile" \
- || ewarn "chown failed on $cronfile, you probably have an orphan file."
- done
- fi
-
- cron_pkg_postinst
-}