Import Debian changes 1.7.2-4

cronie (1.7.2-4) unstable; urgency=medium
.
  * d/patches: Fix FTBFS with GCC-15
.
cronie (1.7.2-3) unstable; urgency=medium
.
  * Move to unstable
.
cronie (1.7.2-2) experimental; urgency=medium
.
  * Move aliased files from / to /usr (Closes: #1073727)
.
cronie (1.7.2-1) unstable; urgency=medium
.
  * New upstream version
  * Standards-Version: 4.7.0 (routine-update)
  * Remove trailing whitespace in debian/copyright (routine-update)
  * Refresh patches
.
cronie (1.7.1-1) unstable; urgency=medium
.
  * New upstream release.
  * Refresh cronie-service-debianization.patch
.
cronie (1.7.0-2) unstable; urgency=medium
.
  * d/patches: Update Manpage-and-typo-fixes.patch
.
cronie (1.7.0-1) unstable; urgency=medium
.
  * New upstream release.
  * Refresh patches.
.
cronie (1.6.1-9) unstable; urgency=medium
.
  * d/control: Drop dependency on adduser (Closes: #1051839)
  * d/cronie.postinst: Trim duplicated code that is in cron-daemon-common
  * d/etc: Remove files installed with cron-daemon-common
.
cronie (1.6.1-8) unstable; urgency=medium
.
  * reorganized debian/control like the same file in cron package.
    Closes: #1046898
.
cronie (1.6.1-7) unstable; urgency=medium
.
  * Move to unstable (Closes: #1043361)
  * d/watch: Update to grab correct source file
  * d/copyright: Update year to 2023 for debian files
  * d/control: Update standards version to 4.6.2 and update maintainer email
  * d/upstream/metadata: Add upstream metadata
.
cronie (1.6.1-6) experimental; urgency=medium
.
  [lq27267@gmail.com]
  * Fix watch file to grab most recent upstream release
.
  [georgesk@debian.org]
  * replaced the dependency on lsb-base by a dependency on sysvinit-utils,
    and removed the versioned mention about the dependency on libpam-runtime
.
cronie (1.6.1-5) experimental; urgency=medium
.
  * cronie pre-depends now on cron-daemon-common, and does no longer install
    conflicting files. Closes: #1023325
.
cronie (1.6.1-4) experimental; urgency=medium
.
  * fixed the watch file
.
cronie (1.6.1-3) experimental; urgency=medium
.
  * reverted previous changes, as I did not notice the closed ITA bug
    #974038, came back to contents authored by Lin Lance.
.
cronie (1.6.1-2) experimental; urgency=medium
.
  * refreshed debian patches, which were targetted to version 1.5.5
.
cronie (1.6.1-1) experimental; urgency=medium
.
  * New upstream version (1.6.1)
  * Refreshed patches
  * d/control: New maintainer (Closes: #974038)
  * d/control: Updated standards (4.6.0), dh-compat (13)
.
cronie (1.5.5-3) experimental; urgency=medium
.
  * Add Hurd-workaround-for-PATH_MAX.patch (Closes: #638048)
  * Fix spelling error in previous changelog entry
.
cronie (1.5.5-2) experimental; urgency=medium
.
  * Don't build /usr/sbin/anacron
    /usr/sbin/anacron is still provided by src:anacron.
    Thanks, Andreas Beckmann, for catching this! (Closes: #944024)
.
cronie (1.5.5-1) experimental; urgency=medium
.
  * New upstream version 1.5.5
  * Drop patches (included upstream):
    - crond-report-missing-newline-before-EOF.patch
    - crontab-Add-Y-N-to-retry-prompt.patch
    - crontab-fsync-to-check-for-full-disk.patch
    - crontab.1-Various-fixes-and-improvements.patch
    - entries-Explicitly-validate-upper-ranges-and-steps.patch
  * Refresh patches
    - debian/patches/Manpage-and-typo-fixes.patch
    - debian/patches/Rename-PAM-service-to-cronie.patch
      + Split out Unbundle-upstream-PAM-config.patch from this one
.
cronie (1.5.4-final-2) experimental; urgency=medium
.
  * build: Set default EDITOR to /usr/bin/sensible-editor
  * d/patches (added):
    - crond-report-missing-newline-before-EOF.patch
    - entries-Explicitly-validate-upper-ranges-and-steps.patch
    - crontab.1-Various-fixes-and-improvements.patch
    - crontab-Add-Y-N-to-retry-prompt.patch
    - crontab-fsync-to-check-for-full-disk.patch
.
cronie (1.5.4-final-1) experimental; urgency=medium
.
  * New upstream release. (Closes: #697811, #783856)
.
  [ Andreas Henriksson ]
  * debian/watch: update for cronie move to github
  * Modify patches to apply against new upstream release
  * Add debian/gbp.conf
  * Adjust and ship the cronie.service file
  * Use debian/clean to remove src/cron-paths.h
  * Fix lintian warning about not using default-mta
  * Fix typo in patch tagging meta-header
.
  [ Christian Kastner ]
  * d/control:
    - Switch Build-Depends from debhelper to debhelper-compat
    - Bump debhelper compatibility level to 12
    - Bump Standards-Version to 4.4.1 (no changes needed)
    - Remove now obsolete d/compat file
    - Set Rules-Requires-Root: no
      We don't need (fake)root for building the package.
    - Point Homepage to GitHub
    - Set Vcs-* URLs for Salsa
    - Mark package cronie as Multi-Arch: foreign
    - Add Pre-Depends: ${misc:Pre-Depends} to binary package
      As recommended by lintian's skip-systemd-native-flag-missing-pre-depends
  * d/cronie.default: Add new daemon flag "-P"
  * d/rules:
    - Add hardening flags
    - Stop passing actions to dh_installinit
      This has been obsoleted by dependency-based booting in Wheezy, see
      https://lists.debian.org/debian-devel/2013/05/msg01109.html
    - Use DEB_HOST_ARCH_OS from /usr/share/dpkg/architecture.mk
    - Proper passing of CFLAGS through DEB_CFLAGS_MAINT_APPEND
  * d/copyright:
    - Fix syntax errors
    - Switch URL to official policy URL
    - Point Source to GitHub
      fedorahosted.org has been retired
    - Bump copyrights
  * d/clean: Remove generated files for (non-enabled) anacron build
  * Sync maintscripts with src:cron
.
cronie (1.4.8-1~exp1) experimental; urgency=low
.
  * Initial release (Closes: #590876)
  * debian/patches added:
    - 0001-Unbundle-anacron
    - 0002-Manpage-and-typo-fixes
    - 0003-Rename-PAM-service-to-cronie
    - 0004-Debian-specific-paths-and-features
    - 0005-Extend-support-for-kFreeBSD-and-GNU-HURD
This commit is contained in:
Lance Lin
2025-02-25 20:43:16 +07:00
committed by geos_one
parent 8035530473
commit 9eb71df9d6
30 changed files with 1290 additions and 0 deletions

View File

@@ -0,0 +1,75 @@
From: Christian Kastner <ckk@kvr.at>
Date: Thu, 28 Jul 2011 11:15:01 +0200
Subject: Debian-specific paths and features
Use Debian-specific paths and features. For example, the spool dir differs from
upstream, and we always build to use syslog.
Forwarded: not-needed
Last-Update: 2011-07-28
---
man/cron.8 | 15 ++-------------
man/crontab.1 | 2 +-
man/crontab.5 | 2 +-
3 files changed, 4 insertions(+), 15 deletions(-)
--- a/man/cron.8
+++ b/man/cron.8
@@ -41,7 +41,7 @@
.PP
.I Cron
searches
-.I /var/spool/cron
+.I /var/spool/cron/crontabs
for crontab files which are named after user accounts;
together with the system crontab
.IR /etc/crontab ,
@@ -88,7 +88,7 @@
.IR /etc/cron.d/
directory that contains system cronjobs stored for different users.
.TP
-.IR /var/spool/cron
+.IR /var/spool/cron/crontabs
directory that contains user crontables created by the
.BR crontab (1)
command.
@@ -181,17 +181,6 @@
.TP
.B "\-V"
Print version and exit.
-.SH SIGNALS
-When the
-.I SIGHUP
-is received, the
-.I Cron
-daemon will close and reopen its log file. This proves to be useful in
-scripts which rotate and age log files. Naturally, this is not relevant
-if
-.I Cron
-was built to use
-.IR syslog (3).
.SH CLUSTERING SUPPORT
In this version of
.IR Cron
--- a/man/crontab.1
+++ b/man/crontab.1
@@ -68,7 +68,7 @@
In this version of
.IR Cron
it is possible to use a network-mounted shared
-.I /var/spool/cron
+.I /var/spool/cron/crontabs
across a cluster of hosts and specify that only one of the hosts should
run the crontab jobs in the particular directory at any one time. You
may also use
--- a/man/crontab.5
+++ b/man/crontab.5
@@ -333,7 +333,7 @@
.SH FILES
.I /etc/crontab
main system crontab file.
-.I /var/spool/cron/
+.I /var/spool/cron/crontabs
a directory for storing crontabs defined by users.
.I /etc/cron.d/
a directory for storing system crontabs.

View File

@@ -0,0 +1,36 @@
From: Christian Kastner <ckk@kvr.at>
Date: Sun, 7 Aug 2011 19:48:09 +0200
Subject: Extend support for kFreeBSD and GNU HURD
Extend some of the #ifdefs to include kFreeBSD and HURD where it's obviously OK
to do so
Forwarded: no
Last-Update: 2011-08-07
---
src/entry.c | 2 +-
src/pathnames.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
--- a/src/entry.c
+++ b/src/entry.c
@@ -403,7 +403,7 @@
}
else
log_it("CRON", getpid(), "ERROR", "can't set LOGNAME", 0);
-#if defined(BSD) || defined(__linux)
+#if defined(BSD) || defined(__linux) || defined(__GLIBC__) || defined(__gnu_hurd__)
if (glue_strings(envstr, sizeof envstr, "USER", pw->pw_name, '=')) {
if ((tenvp = env_set(e->envp, envstr)) == NULL) {
ecode = e_memory;
--- a/src/pathnames.h
+++ b/src/pathnames.h
@@ -26,7 +26,7 @@
#ifndef _PATHNAMES_H_
#define _PATHNAMES_H_
-#if (defined(BSD)) && (BSD >= 199103) || defined(__linux) || defined(AIX)
+#if (defined(BSD)) && (BSD >= 199103) || defined(__linux) || defined(AIX) || defined(__GLIBC__) || defined(__gnu_hurd__)
# include <paths.h>
#endif /*BSD*/

View File

@@ -0,0 +1,27 @@
From: Christian Kastner <ckk@kvr.at>
Date: Tue, 5 Nov 2019 07:52:09 +0100
Subject: Hurd workaround for PATH_MAX
PATH_MAX is not defined on GNU Hurd, which is legal according to POSIX.
https://www.gnu.org/software/hurd/hurd/porting/guidelines.html
Bug-Debian: https://bugs.debian.org/638048
---
src/macros.h | 5 +++++
1 file changed, 5 insertions(+)
--- a/src/macros.h
+++ b/src/macros.h
@@ -43,6 +43,11 @@
#define DEBUGGING FALSE
#endif
+/* Gnu Hurd has no limit on pathnames */
+#if !defined PATH_MAX && defined __GNU__
+#define PATH_MAX 4096
+#endif
+
#define INIT_PID 1 /* parent of orphans */
#define READ_PIPE 0 /* which end of a pipe pair do you read? */
#define WRITE_PIPE 1 /* or write to? */

View File

@@ -0,0 +1,151 @@
From: Christian Kastner <ckk@kvr.at>, Lance Lin <lq27267@gmail.com>
Date: Thu, 28 Jul 2011 11:07:40 +0200
Subject: Manpage and typo fixes
Last-Update: 21 Nov 2023
Correct some errors or clarify sections in the manpages; fix some typos
---
man/cron.8 | 43 ++++++++++++++++---------------------------
man/crontab.1 | 2 +-
man/crontab.5 | 2 +-
src/cron.c | 2 +-
4 files changed, 19 insertions(+), 30 deletions(-)
--- a/man/cron.8
+++ b/man/cron.8
@@ -37,23 +37,15 @@
.B -V
.SH DESCRIPTION
.I Cron
-is started from
-.I /etc/rc.d/init.d
-or
-.I /etc/init.d
-when classical sysvinit scripts are used. In case systemd is enabled, then unit file is installed into
-.I /lib/systemd/system/crond.service
-and daemon is started by
-.I systemctl start crond.service
-command. It returns immediately, thus, there is no need to need to start it with
-the '&' parameter.
+is automatically started at boot time.
.PP
.I Cron
searches
.I /var/spool/cron
-for crontab files which are named after accounts in
-.I /etc/passwd;
-The found crontabs are loaded into the memory.
+for crontab files which are named after user accounts;
+together with the system crontab
+.IR /etc/crontab ,
+the found crontabs are loaded into the memory.
.I Cron
also searches for
any files in the
@@ -71,12 +63,11 @@
option.
.PP
There are two ways how changes in crontables are checked. The first
-method is checking the modtime of a file. The second method is using the
-inotify support. Using of inotify is logged in the
-.I /var/log/cron
-log after the daemon is started. The inotify support checks for changes
-in all crontables and accesses the hard disk only when a change is
-detected.
+method is checking the modtime of a file. The second method
+is using inotify support, which is only available on Linux.
+When the daemon uses inotify, it logs this fact to syslog on startup.
+The inotify support checks for changes in all crontables and accesses the
+hard disk only when a change is detected.
.PP
When using the modtime option,
.I Cron
@@ -99,13 +90,8 @@
.TP
.IR /var/spool/cron
directory that contains user crontables created by the
-.IR crontab
-command.
-.PP
-Note that the
.BR crontab (1)
-command updates the modtime of the spool directory whenever it changes a
-crontab.
+command.
.PP
.SS Daylight Saving Time and other time changes
Local time changes of less than three hours, such as those caused by the
@@ -153,7 +139,6 @@
standard input and send it as a mail message to the recipients specified
in the mail headers. Specifying the string
.I "off"
-(i.e., crond -m off)
will disable the sending of mail.
.TP
.B "\-n"
@@ -167,10 +152,14 @@
.B "\-f"
the same as -n, consistent with other crond implementations.
.TP
+.B "\-i"
+Disables inotify support (if present)
+.TP
.B "\-p"
Allows
.I Cron
-to accept any user set crontables.
+to accept any user set crontables (read: lift owner, type and mode
+restrictions)
.TP
.B "\-P"
Don't set PATH. PATH is instead inherited from the environment.
--- a/man/crontab.1
+++ b/man/crontab.1
@@ -109,7 +109,7 @@
.IR /etc/cron.d/
directory.
.PP
-The temporary directory can be set in an environment variable. If it is
+The temporary directory can be set using the environment variable $TMPDIR. If it is
not set by the user, the
.I /tmp
directory is used.
--- a/man/crontab.5
+++ b/man/crontab.5
@@ -65,7 +65,7 @@
.I LOGNAME
and
.I HOME
-are set from the /etc/passwd line of the crontab\'s owner.
+are set from the /etc/passwd line of the crontab's owner.
.I HOME
and
.I SHELL
@@ -272,7 +272,7 @@
# run at 2:15pm on the first of every month -- output mailed to paul
15 14 1 * * $HOME/bin/monthly
# run at 10 pm on weekdays, annoy Joe
-0 22 * * 1-5 mail -s "It's 10pm" joe%Joe,%%Where are your kids?%
+0 22 * * 1-5 mail \-s "It's 10pm" joe%Joe,%%Where are your kids?%
23 0-23/2 * * * echo "run 23 minutes after midn, 2am, 4am ..., everyday"
5 4 * * sun echo "run at 5 after 4 every sunday"
.fi
@@ -292,14 +292,14 @@
* * * * * root touch /tmp/file
.fi
.SH NOTES
-As noted above, skip values only operate within the time period they\'re
+As noted above, skip values only operate within the time period they're
attached to. For example, specifying "0/35" for the minute field of a
-crontab entry won\'t cause that entry to be executed every 35 minutes;
+crontab entry won't cause that entry to be executed every 35 minutes;
instead, it will be executed twice every hour, at 0 and 35 minutes past.
For more fine-grained control you can do something like this:
.nf
-* * * * * if [ $(expr \\( $(date +%s) / 60 \\) % 58) = 0 ]; then echo this runs every 58 minutes; fi
-0 * * * * if [ $(expr \\( $(date +%s) / 3600 \\) % 23) = 0 ]; then echo this runs every 23 hours on the hour; fi
+* * * * * if [ $(expr ( $(date +%s) / 60 ) % 58) = 0 ]; then echo this runs every 58 minutes; fi
+0 * * * * if [ $(expr ( $(date +%s) / 3600 ) % 23) = 0 ]; then echo this runs every 23 hours on the hour; fi
.fi
Adjust as needed if your
.BR date (1)

View File

@@ -0,0 +1,24 @@
From: Christian Kastner <ckk@kvr.at>
Date: Thu, 28 Jul 2011 11:11:45 +0200
Subject: Rename PAM service to cronie
Upstream uses "crond"; we switch to "cron" to avoid confusion with Debian's ISC
cron (it uses "cron" but that might change).
Forwarded: not-needed
Last-Update: 2011-07-28
---
src/security.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/src/security.c
+++ b/src/security.c
@@ -195,7 +195,7 @@
int cron_start_pam(struct passwd *pw) {
int retcode = 0;
- retcode = pam_start("crond", pw->pw_name, &conv, &pamh);
+ retcode = pam_start("cronie", pw->pw_name, &conv, &pamh);
PAM_FAIL_CHECK;
retcode = pam_set_item(pamh, PAM_TTY, "cron");
PAM_FAIL_CHECK;

40
debian/patches/Unbundle-anacron.patch vendored Normal file
View File

@@ -0,0 +1,40 @@
From: Christian Kastner <ckk@kvr.at>
Date: Thu, 28 Jul 2011 11:01:03 +0200
Subject: Unbundle anacron
Upstream has integrated anacron into cronie. Debian has its own package, so
we unbundle it (mostly by removing references to it).
Forwarded: not-needed
Last-Update: 2011-07-28
---
man/cron.8 | 11 +++--------
1 file changed, 3 insertions(+), 8 deletions(-)
--- a/man/cron.8
+++ b/man/cron.8
@@ -56,8 +56,7 @@
The found crontabs are loaded into the memory.
.I Cron
also searches for
-.I /etc/anacrontab
-and any files in the
+any files in the
.I /etc/cron.d
directory, which have a different format (see
.BR crontab (5)).
@@ -91,12 +90,8 @@
checks these files and directories:
.TP
.IR /etc/crontab
-system crontab. Nowadays the file is empty by default. Originally it
-was usually used to run daily, weekly, monthly jobs. By default these
-jobs are now run through anacron which reads
-.IR /etc/anacrontab
-configuration file. See
-.BR anacrontab (5)
+system crontab, usually used to run daily, weekly, monthly jobs. See
+.BR crontab (5)
for more details.
.TP
.IR /etc/cron.d/

View File

@@ -0,0 +1,27 @@
From: Christian Kastner <ckk@kvr.at>
Date: Thu, 31 Oct 2019 22:16:13 +0100
Subject: Unbundle upstream PAM config
We supply our own PAM config, tailored to the Debian setup.
Last-Update: 2019-10-31
---
Makefile.am | 7 -------
1 file changed, 7 deletions(-)
--- a/Makefile.am
+++ b/Makefile.am
@@ -24,13 +24,6 @@
contrib/cronie.systemd \
anacron/ChangeLog.anacron
-if PAM
-pamdir = $(sysconfdir)/pam.d
-dist_pam_DATA = pam/crond
-else
-EXTRA_DIST += pam/crond
-endif
-
include anacron/Makemodule.am
include man/Makemodule.am
include src/Makemodule.am

View File

@@ -0,0 +1,27 @@
From: Andreas Henriksson <andreas@fatal.se>
Date: Mon, 28 Oct 2019 19:33:53 +0100
Subject: Adjust the cronie.service file for debian use
Use default file instead of sysconfig, as shipped by this
package (debian/cronie.default) and also modify the variable
on ExecStart line as for what is used in the shipped default
file.
Forwarded: not-needed
---
contrib/cronie.systemd | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/contrib/cronie.systemd
+++ b/contrib/cronie.systemd
@@ -3,8 +3,8 @@
After=auditd.service nss-user-lookup.target systemd-user-sessions.service time-sync.target ypbind.service autofs.service
[Service]
-EnvironmentFile=-/etc/sysconfig/crond
-ExecStart=/usr/sbin/crond -n $CRONDARGS
+EnvironmentFile=-/etc/default/cronie
+ExecStart=/usr/sbin/crond -n $DAEMON_ARGS
ExecReload=/bin/kill -URG $MAINPID
KillMode=process
Restart=on-failure

187
debian/patches/fix-ftbfs-gcc-15.patch vendored Normal file
View File

@@ -0,0 +1,187 @@
Author: Lance Lin <lq27267@gmail.com>
Date: Tue, 25 Feb 2025 20:27:50 +0700
Description: Fix FTBFS with GCC-15
--- a/src/cronnext.c
+++ b/src/cronnext.c
@@ -55,7 +55,7 @@
#ifdef WITH_SELINUX
int get_security_context(const char *name, int crontab_fd,
- security_context_t *rcontext, const char *tabname) {
+ char **rcontext, const char *tabname) {
/* empty stub */
(void)name;
(void)crontab_fd;
@@ -64,7 +64,7 @@
return 0;
}
-void free_security_context(security_context_t *scontext) {
+void free_security_context(char **scontext) {
/* empty stub */
(void)scontext;
}
--- a/src/crontab.c
+++ b/src/crontab.c
@@ -303,7 +303,7 @@
break;
#ifdef WITH_SELINUX
case 's':
- if (getprevcon((security_context_t *) & (selinux_context))) {
+ if (getprevcon((char **) & (selinux_context))) {
fprintf(stderr, "Cannot obtain SELinux process context\n");
exit(ERROR_EXIT);
}
--- a/src/funcs.h
+++ b/src/funcs.h
@@ -89,7 +89,7 @@
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 **);
@@ -115,11 +115,11 @@
int get_security_context(const char *name,
int crontab_fd,
- security_context_t *rcontext,
+ char **rcontext,
const char *tabname
);
-void free_security_context( security_context_t *scontext );
+void free_security_context( char **scontext );
int crontab_security_access(void);
--- a/src/security.c
+++ b/src/security.c
@@ -94,8 +94,8 @@
static char **build_env(char **cronenv);
#ifdef WITH_SELINUX
-static int cron_change_selinux_range(user * u, security_context_t ucontext);
-static int cron_get_job_range(user * u, security_context_t * ucontextp,
+static int cron_change_selinux_range(user * u, char * ucontext);
+static int cron_get_job_range(user * u, char ** ucontextp,
char **jobenv);
#endif
@@ -137,7 +137,7 @@
/* we must get the crontab context BEFORE changing user, else
* we'll not be permitted to read the cron spool directory :-)
*/
- security_context_t ucontext = 0;
+ char * ucontext = 0;
if (cron_get_job_range(u, &ucontext, e->envp) < OK) {
log_it(e->pwd->pw_name, getpid(), "ERROR",
@@ -276,8 +276,8 @@
#ifdef WITH_SELINUX
-static int cron_authorize_context(security_context_t scontext,
- security_context_t file_context) {
+static int cron_authorize_context(char * scontext,
+ char * file_context) {
struct av_decision avd;
int retval;
security_class_t tclass;
@@ -309,8 +309,8 @@
#endif
#ifdef WITH_SELINUX
-static int cron_authorize_range(security_context_t scontext,
- security_context_t ucontext) {
+static int cron_authorize_range(char * scontext,
+ char * ucontext) {
struct av_decision avd;
int retval;
security_class_t tclass;
@@ -345,7 +345,7 @@
/* always uses u->scontext as the default process context, then changes the
level, and returns it in ucontextp (or NULL otherwise) */
static int
-cron_get_job_range(user * u, security_context_t * ucontextp, char **jobenv) {
+cron_get_job_range(user * u, char ** ucontextp, char **jobenv) {
char *range;
if (is_selinux_enabled() <= 0)
@@ -398,7 +398,7 @@
#endif
#ifdef WITH_SELINUX
-static int cron_change_selinux_range(user * u, security_context_t ucontext) {
+static int cron_change_selinux_range(user * u, char * ucontext) {
char *msg = NULL;
if (is_selinux_enabled() <= 0)
@@ -481,10 +481,10 @@
#ifdef WITH_SELINUX
int
get_security_context(const char *name, int crontab_fd,
- security_context_t * rcontext, const char *tabname) {
- security_context_t scontext = NULL;
- security_context_t file_context = NULL;
- security_context_t rawcontext=NULL;
+ char ** rcontext, const char *tabname) {
+ char * scontext = NULL;
+ char * file_context = NULL;
+ char * rawcontext=NULL;
context_t current_context = NULL;
int retval;
char *current_context_str = NULL;
@@ -589,7 +589,7 @@
#endif
#ifdef WITH_SELINUX
-void free_security_context(security_context_t * scontext) {
+void free_security_context(char ** scontext) {
if (*scontext != NULL) {
freecon(*scontext);
*scontext = NULL;
@@ -601,7 +601,7 @@
int crontab_security_access(void) {
int selinux_check_passwd_access = -1;
if (is_selinux_enabled() > 0) {
- security_context_t user_context;
+ char * user_context;
if (getprevcon_raw(&user_context) == 0) {
security_class_t passwd_class;
access_vector_t crontab_bit;
--- a/src/structs.h
+++ b/src/structs.h
@@ -57,9 +57,6 @@
*
* These are the crontabs.
*/
-#ifndef WITH_SELINUX
-#define security_context_t unsigned
-#endif
typedef struct _user {
struct _user *next, *prev; /* links */
@@ -67,7 +64,7 @@
char *tabname; /* /etc/cron.d/ file name or NULL */
time_t mtime; /* last modtime of crontab */
entry *crontab; /* this person's crontab */
- security_context_t scontext; /* SELinux security context */
+ char * scontext; /* SELinux security context */
int system; /* is it a system crontab */
} user;
--- a/src/entry.c
+++ b/src/entry.c
@@ -90,7 +90,7 @@
/* 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

9
debian/patches/series vendored Normal file
View File

@@ -0,0 +1,9 @@
Unbundle-anacron.patch
Manpage-and-typo-fixes.patch
Rename-PAM-service-to-cronie.patch
Unbundle-upstream-PAM-config.patch
Debian-specific-paths-and-features.patch
Extend-support-for-kFreeBSD-and-GNU-HURD.patch
cronie-service-debianization.patch
Hurd-workaround-for-PATH_MAX.patch
fix-ftbfs-gcc-15.patch