cronie: update to 1.5.7

This commit is contained in:
Leonid Pliushch 2021-05-03 18:43:38 +00:00
parent 05b4bd3520
commit f148e325c7
No known key found for this signature in database
GPG Key ID: 45F2964132545795
3 changed files with 67 additions and 71 deletions

View File

@ -2,10 +2,9 @@ TERMUX_PKG_HOMEPAGE=https://github.com/cronie-crond/cronie/
TERMUX_PKG_DESCRIPTION="Daemon that runs specified programs at scheduled times and related tools" TERMUX_PKG_DESCRIPTION="Daemon that runs specified programs at scheduled times and related tools"
TERMUX_PKG_LICENSE="BSD" TERMUX_PKG_LICENSE="BSD"
TERMUX_PKG_MAINTAINER="@termux" TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=1.5.5 TERMUX_PKG_VERSION=1.5.7
TERMUX_PKG_REVISION=6
TERMUX_PKG_SRCURL=https://github.com/cronie-crond/cronie/releases/download/cronie-${TERMUX_PKG_VERSION}/cronie-${TERMUX_PKG_VERSION}.tar.gz TERMUX_PKG_SRCURL=https://github.com/cronie-crond/cronie/releases/download/cronie-${TERMUX_PKG_VERSION}/cronie-${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=be34c79505e5544323281854744b9955ff16b160ee569f9df7c0dddae5720eac TERMUX_PKG_SHA256=538bcfaf2e986e5ae1edf6d1472a77ea8271d6a9005aee2497a9ed6e13320eb3
TERMUX_PKG_DEPENDS="dash" TERMUX_PKG_DEPENDS="dash"
TERMUX_PKG_RECOMMENDS="nano" TERMUX_PKG_RECOMMENDS="nano"
TERMUX_PKG_SUGGESTS="termux-services" TERMUX_PKG_SUGGESTS="termux-services"

View File

@ -1,6 +1,6 @@
diff -uNr cronie-1.5.5/man/cron.8 cronie-1.5.5.mod/man/cron.8 diff -uNr cronie-1.5.7/man/cron.8 cronie-1.5.7.mod/man/cron.8
--- cronie-1.5.5/man/cron.8 2017-09-14 14:34:58.000000000 +0300 --- cronie-1.5.7/man/cron.8 2017-09-14 11:34:58.000000000 +0000
+++ cronie-1.5.5.mod/man/cron.8 2020-07-09 00:39:44.598999871 +0300 +++ cronie-1.5.7.mod/man/cron.8 2021-05-03 18:31:02.488787206 +0000
@@ -27,7 +27,7 @@ @@ -27,7 +27,7 @@
crond \- daemon to execute scheduled commands crond \- daemon to execute scheduled commands
.SH SYNOPSIS .SH SYNOPSIS
@ -167,9 +167,9 @@ diff -uNr cronie-1.5.5/man/cron.8 cronie-1.5.5.mod/man/cron.8
.SH CAVEATS .SH CAVEATS
All All
.BR crontab .BR crontab
diff -uNr cronie-1.5.5/man/cronnext.1 cronie-1.5.5.mod/man/cronnext.1 diff -uNr cronie-1.5.7/man/cronnext.1 cronie-1.5.7.mod/man/cronnext.1
--- cronie-1.5.5/man/cronnext.1 2019-04-08 17:00:11.000000000 +0300 --- cronie-1.5.7/man/cronnext.1 2019-04-08 14:00:11.000000000 +0000
+++ cronie-1.5.5.mod/man/cronnext.1 2020-07-09 00:39:32.430945000 +0300 +++ cronie-1.5.7.mod/man/cronnext.1 2021-05-03 18:31:02.488787206 +0000
@@ -33,10 +33,9 @@ @@ -33,10 +33,9 @@
.TP .TP
.B \-s .B \-s
@ -183,10 +183,10 @@ diff -uNr cronie-1.5.5/man/cronnext.1 cronie-1.5.5.mod/man/cronnext.1
.TP .TP
.BI \-a .BI \-a
Use the crontabs installed in the system in addition to the ones passed as Use the crontabs installed in the system in addition to the ones passed as
diff -uNr cronie-1.5.5/man/crontab.1 cronie-1.5.5.mod/man/crontab.1 diff -uNr cronie-1.5.7/man/crontab.1 cronie-1.5.7.mod/man/crontab.1
--- cronie-1.5.5/man/crontab.1 2019-10-31 16:50:32.000000000 +0200 --- cronie-1.5.7/man/crontab.1 2021-03-19 10:15:42.000000000 +0000
+++ cronie-1.5.5.mod/man/crontab.1 2020-07-09 00:39:44.598999871 +0300 +++ cronie-1.5.7.mod/man/crontab.1 2021-05-03 18:35:47.696788900 +0000
@@ -27,25 +27,14 @@ @@ -27,8 +27,6 @@
crontab \- maintains crontab files for individual users crontab \- maintains crontab files for individual users
.SH SYNOPSIS .SH SYNOPSIS
.B crontab .B crontab
@ -195,6 +195,9 @@ diff -uNr cronie-1.5.5/man/crontab.1 cronie-1.5.5.mod/man/crontab.1
.RI < "file" .RI < "file"
.RB | \ - > .RB | \ - >
.br .br
@@ -38,19 +36,10 @@
.RB | \ - >
.br
.B crontab .B crontab
-.RB [ -u -.RB [ -u
-.IR user ] -.IR user ]
@ -212,7 +215,7 @@ diff -uNr cronie-1.5.5/man/crontab.1 cronie-1.5.5.mod/man/crontab.1
.BR -V .BR -V
.SH DESCRIPTION .SH DESCRIPTION
.I Crontab .I Crontab
@@ -55,72 +44,16 @@ @@ -60,58 +49,12 @@
.BR cron (8) .BR cron (8)
daemon. Each user can have their own crontab, and though these are files daemon. Each user can have their own crontab, and though these are files
in in
@ -272,6 +275,9 @@ diff -uNr cronie-1.5.5/man/crontab.1 cronie-1.5.5.mod/man/crontab.1
-.I /tmp -.I /tmp
+.I @TERMUX_PREFIX@/tmp +.I @TERMUX_PREFIX@/tmp
directory is used. directory is used.
.PP
When listing a crontab on a terminal the output will be colorized unless
@@ -121,16 +64,6 @@
.PP .PP
.SH "OPTIONS" .SH "OPTIONS"
.TP .TP
@ -285,10 +291,10 @@ diff -uNr cronie-1.5.5/man/crontab.1 cronie-1.5.5.mod/man/crontab.1
-.B crontab -u -.B crontab -u
-command is used under their username. -command is used under their username.
-.TP -.TP
.B "\-l" .B "\-T"
Displays the current crontab on standard output. Test the crontab file syntax without installing it.
.TP Once an issue is found, the validation is interrupted, so this will not return all the existing issues at the same execution.
@@ -147,74 +80,11 @@ @@ -161,74 +94,11 @@
documentation of MLS_LEVEL in documentation of MLS_LEVEL in
.BR crontab (5). .BR crontab (5).
.TP .TP

View File

@ -1,7 +1,7 @@
diff -uNr cronie-1.5.5/src/cron.c cronie-1.5.5.mod/src/cron.c diff -uNr cronie-1.5.7/src/cron.c cronie-1.5.7.mod/src/cron.c
--- cronie-1.5.5/src/cron.c 2019-04-15 11:33:30.000000000 +0300 --- cronie-1.5.7/src/cron.c 2021-01-22 11:29:39.000000000 +0000
+++ cronie-1.5.5.mod/src/cron.c 2020-07-09 00:31:25.288737591 +0300 +++ cronie-1.5.7.mod/src/cron.c 2021-05-03 18:37:15.040789324 +0000
@@ -187,7 +187,9 @@ @@ -184,7 +184,9 @@
fprintf(stderr, " -n run in foreground\n"); fprintf(stderr, " -n run in foreground\n");
fprintf(stderr, " -p permit any crontab\n"); fprintf(stderr, " -p permit any crontab\n");
fprintf(stderr, " -P use PATH=\"%s\"\n", _PATH_DEFPATH); fprintf(stderr, " -P use PATH=\"%s\"\n", _PATH_DEFPATH);
@ -11,7 +11,7 @@ diff -uNr cronie-1.5.5/src/cron.c cronie-1.5.5.mod/src/cron.c
fprintf(stderr, " -s log into syslog instead of sending mails\n"); fprintf(stderr, " -s log into syslog instead of sending mails\n");
fprintf(stderr, " -V print version and exit\n"); fprintf(stderr, " -V print version and exit\n");
fprintf(stderr, " -x <flag> print debug information\n"); fprintf(stderr, " -x <flag> print debug information\n");
@@ -691,7 +693,7 @@ @@ -689,7 +691,7 @@
static void parse_args(int argc, char *argv[]) { static void parse_args(int argc, char *argv[]) {
int argch; int argch;
@ -20,7 +20,7 @@ diff -uNr cronie-1.5.5/src/cron.c cronie-1.5.5.mod/src/cron.c
switch (argch) { switch (argch) {
case 'x': case 'x':
if (!set_debug_flags(optarg)) if (!set_debug_flags(optarg))
@@ -715,9 +717,11 @@ @@ -713,9 +715,11 @@
case 'm': case 'm':
strncpy(MailCmd, optarg, MAX_COMMAND); strncpy(MailCmd, optarg, MAX_COMMAND);
break; break;
@ -32,53 +32,44 @@ diff -uNr cronie-1.5.5/src/cron.c cronie-1.5.5.mod/src/cron.c
case 'V': case 'V':
puts(PACKAGE_STRING); puts(PACKAGE_STRING);
exit(EXIT_SUCCESS); exit(EXIT_SUCCESS);
diff -uNr cronie-1.5.5/src/crontab.c cronie-1.5.5.mod/src/crontab.c diff -uNr cronie-1.5.7/src/crontab.c cronie-1.5.7.mod/src/crontab.c
--- cronie-1.5.5/src/crontab.c 2019-10-31 16:50:32.000000000 +0200 --- cronie-1.5.7/src/crontab.c 2021-03-19 10:15:42.000000000 +0000
+++ cronie-1.5.5.mod/src/crontab.c 2020-07-09 00:31:25.288737591 +0300 +++ cronie-1.5.7.mod/src/crontab.c 2021-05-03 18:40:24.992789931 +0000
@@ -75,15 +75,15 @@ @@ -81,15 +81,15 @@
static const char *Options[] = {"???", "list", "delete", "edit", "replace", "hostset", "hostget"}; };
# ifdef WITH_SELINUX # ifdef WITH_SELINUX
-static const char *getoptargs = "u:lerisncx:V"; -static const char *getoptargs = "u:lerisncx:VT";
+static const char *getoptargs = "u:lerisx:V"; +static const char *getoptargs = "lerisx:VT";
# else # else
-static const char *getoptargs = "u:lerincx:V"; -static const char *getoptargs = "u:lerincx:VT";
+static const char *getoptargs = "u:lerix:V"; +static const char *getoptargs = "lerix:VT";
# endif # endif
#else #else
# ifdef WITH_SELINUX # ifdef WITH_SELINUX
-static const char *getoptargs = "u:lerisncV"; -static const char *getoptargs = "u:lerisncVT";
+static const char *getoptargs = "u:lerisV"; +static const char *getoptargs = "lerisVT";
# else # else
-static const char *getoptargs = "u:lerincV"; -static const char *getoptargs = "u:lerincVT";
+static const char *getoptargs = "u:leriV"; +static const char *getoptargs = "leriVT";
# endif # endif
#endif #endif
#ifdef WITH_SELINUX #ifdef WITH_SELINUX
@@ -115,16 +115,22 @@ @@ -127,13 +127,10 @@
fprintf(stderr, "Usage:\n");
fprintf(stderr, " %s [options] file\n", ProgramName);
fprintf(stderr, " %s [options]\n", ProgramName);
+#ifndef __ANDROID__
fprintf(stderr, " %s -n [hostname]\n", ProgramName); fprintf(stderr, " %s -n [hostname]\n", ProgramName);
+#endif
fprintf(stderr, "\n"); fprintf(stderr, "\n");
fprintf(stderr, "Options:\n"); fprintf(stderr, "Options:\n");
+#ifndef __ANDROID__ - fprintf(stderr, " -u <user> define user\n");
fprintf(stderr, " -u <user> define user\n");
+#endif
fprintf(stderr, " -e edit user's crontab\n"); fprintf(stderr, " -e edit user's crontab\n");
fprintf(stderr, " -l list user's crontab\n"); fprintf(stderr, " -l list user's crontab\n");
fprintf(stderr, " -r delete user's crontab\n"); fprintf(stderr, " -r delete user's crontab\n");
fprintf(stderr, " -i prompt before deleting\n"); fprintf(stderr, " -i prompt before deleting\n");
+#ifndef __ANDROID__ - fprintf(stderr, " -n <host> set host in cluster to run users' crontabs\n");
fprintf(stderr, " -n <host> set host in cluster to run users' crontabs\n"); - fprintf(stderr, " -c get host in cluster to run users' crontabs\n");
fprintf(stderr, " -c get host in cluster to run users' crontabs\n"); fprintf(stderr, " -T <file> test a crontab file syntax\n");
+#endif
#ifdef WITH_SELINUX #ifdef WITH_SELINUX
fprintf(stderr, " -s selinux context\n"); fprintf(stderr, " -s selinux context\n");
#endif @@ -167,6 +164,7 @@
@@ -157,6 +163,7 @@
#endif #endif
parse_args(argc, argv); /* sets many globals, opens a file */ parse_args(argc, argv); /* sets many globals, opens a file */
check_spool_dir(); check_spool_dir();
@ -86,7 +77,7 @@ diff -uNr cronie-1.5.5/src/crontab.c cronie-1.5.5.mod/src/crontab.c
if (!allowed(RealUser, CRON_ALLOW, CRON_DENY)) { if (!allowed(RealUser, CRON_ALLOW, CRON_DENY)) {
fprintf(stderr, fprintf(stderr,
"You (%s) are not allowed to use this program (%s)\n", "You (%s) are not allowed to use this program (%s)\n",
@@ -165,7 +172,7 @@ @@ -175,7 +173,7 @@
log_it(RealUser, Pid, "AUTH", "crontab command not allowed", 0); log_it(RealUser, Pid, "AUTH", "crontab command not allowed", 0);
exit(ERROR_EXIT); exit(ERROR_EXIT);
} }
@ -95,7 +86,7 @@ diff -uNr cronie-1.5.5/src/crontab.c cronie-1.5.5.mod/src/crontab.c
#if defined(WITH_PAM) #if defined(WITH_PAM)
if (getuid() != 0 && cron_start_pam(pw) != PAM_SUCCESS) { if (getuid() != 0 && cron_start_pam(pw) != PAM_SUCCESS) {
fprintf(stderr, fprintf(stderr,
@@ -214,7 +221,7 @@ @@ -228,7 +226,7 @@
int argch; int argch;
if (!(pw = getpwuid(getuid()))) { if (!(pw = getpwuid(getuid()))) {
@ -104,7 +95,7 @@ diff -uNr cronie-1.5.5/src/crontab.c cronie-1.5.5.mod/src/crontab.c
ProgramName); ProgramName);
fprintf(stderr, "bailing out.\n"); fprintf(stderr, "bailing out.\n");
exit(ERROR_EXIT); exit(ERROR_EXIT);
@@ -237,6 +244,7 @@ @@ -251,6 +249,7 @@
usage("bad debug option"); usage("bad debug option");
break; break;
#endif #endif
@ -112,7 +103,7 @@ diff -uNr cronie-1.5.5/src/crontab.c cronie-1.5.5.mod/src/crontab.c
case 'u': case 'u':
if (MY_UID(pw) != ROOT_UID) { if (MY_UID(pw) != ROOT_UID) {
fprintf(stderr, "must be privileged to use -u\n"); fprintf(stderr, "must be privileged to use -u\n");
@@ -264,6 +272,7 @@ @@ -278,6 +277,7 @@
usage("username too long"); usage("username too long");
(void) strcpy(User, optarg); (void) strcpy(User, optarg);
break; break;
@ -120,15 +111,15 @@ diff -uNr cronie-1.5.5/src/crontab.c cronie-1.5.5.mod/src/crontab.c
case 'l': case 'l':
if (Option != opt_unknown) if (Option != opt_unknown)
usage("only one operation permitted"); usage("only one operation permitted");
@@ -290,6 +299,7 @@ @@ -309,6 +309,7 @@
} }
break; break;
#endif #endif
+#ifndef __ANDROID__ +#ifndef __ANDROID__
case 'n': case 'n':
if (MY_UID(pw) != ROOT_UID) { if (MY_UID(pw) != ROOT_UID) {
fprintf(stderr, fprintf(stderr, "must be privileged to set host with -n\n");
@@ -315,6 +325,7 @@ @@ -331,6 +332,7 @@
} }
Option = opt_hostget; Option = opt_hostget;
break; break;
@ -136,7 +127,7 @@ diff -uNr cronie-1.5.5/src/crontab.c cronie-1.5.5.mod/src/crontab.c
case 'V': case 'V':
puts(PACKAGE_STRING); puts(PACKAGE_STRING);
exit(EXIT_SUCCESS); exit(EXIT_SUCCESS);
@@ -630,6 +641,7 @@ @@ -663,6 +665,7 @@
goto fatal; goto fatal;
case 0: case 0:
/* child */ /* child */
@ -144,7 +135,7 @@ diff -uNr cronie-1.5.5/src/crontab.c cronie-1.5.5.mod/src/crontab.c
if (setgid(MY_GID(pw)) < 0) { if (setgid(MY_GID(pw)) < 0) {
perror("setgid(getgid())"); perror("setgid(getgid())");
exit(ERROR_EXIT); exit(ERROR_EXIT);
@@ -638,6 +650,7 @@ @@ -671,6 +674,7 @@
perror("setuid(getuid())"); perror("setuid(getuid())");
exit(ERROR_EXIT); exit(ERROR_EXIT);
} }
@ -152,15 +143,15 @@ diff -uNr cronie-1.5.5/src/crontab.c cronie-1.5.5.mod/src/crontab.c
if (!glue_strings(q, sizeof q, editor, Filename, ' ')) { if (!glue_strings(q, sizeof q, editor, Filename, ' ')) {
fprintf(stderr, "%s: editor command line too long\n", ProgramName); fprintf(stderr, "%s: editor command line too long\n", ProgramName);
exit(ERROR_EXIT); exit(ERROR_EXIT);
@@ -896,6 +909,7 @@ @@ -878,6 +882,7 @@
file_owner = (getgid() == geteuid() &&
file_owner = (getgid() == geteuid() && getgid() == getegid()) ? ROOT_UID : pw->pw_uid; getgid() == getegid()) ? ROOT_UID : pw->pw_uid;
+#ifndef __ANDROID__ +#ifndef __ANDROID__
#ifdef HAVE_FCHOWN #ifdef HAVE_FCHOWN
if (fchown(fileno(tmp), file_owner, (gid_t)-1) < OK) { if (fchown(fileno(tmp), file_owner, (gid_t)-1) < OK) {
perror("fchown"); perror("fchown");
@@ -911,6 +925,7 @@ @@ -893,6 +898,7 @@
goto done; goto done;
} }
#endif #endif
@ -168,9 +159,9 @@ diff -uNr cronie-1.5.5/src/crontab.c cronie-1.5.5.mod/src/crontab.c
if (fclose(tmp) == EOF) { if (fclose(tmp) == EOF) {
perror("fclose"); perror("fclose");
diff -uNr cronie-1.5.5/src/misc.c cronie-1.5.5.mod/src/misc.c diff -uNr cronie-1.5.7/src/misc.c cronie-1.5.7.mod/src/misc.c
--- cronie-1.5.5/src/misc.c 2019-05-07 15:45:40.000000000 +0300 --- cronie-1.5.7/src/misc.c 2019-05-07 12:45:40.000000000 +0000
+++ cronie-1.5.5.mod/src/misc.c 2020-07-09 00:31:21.068718342 +0300 +++ cronie-1.5.7.mod/src/misc.c 2021-05-03 18:37:15.040789324 +0000
@@ -228,6 +228,9 @@ @@ -228,6 +228,9 @@
} }
@ -205,9 +196,9 @@ diff -uNr cronie-1.5.5/src/misc.c cronie-1.5.5.mod/src/misc.c
size_t strlens(const char *last, ...) { size_t strlens(const char *last, ...) {
va_list ap; va_list ap;
size_t ret = 0; size_t ret = 0;
diff -uNr cronie-1.5.5/src/security.c cronie-1.5.5.mod/src/security.c diff -uNr cronie-1.5.7/src/security.c cronie-1.5.7.mod/src/security.c
--- cronie-1.5.5/src/security.c 2019-04-15 11:33:30.000000000 +0300 --- cronie-1.5.7/src/security.c 2021-01-22 11:29:39.000000000 +0000
+++ cronie-1.5.5.mod/src/security.c 2020-07-09 00:31:25.288737591 +0300 +++ cronie-1.5.7.mod/src/security.c 2021-05-03 18:37:15.040789324 +0000
@@ -235,6 +235,10 @@ @@ -235,6 +235,10 @@
} }