From 4727c770c2a723d46b4162cff21ab8f0b75c3998 Mon Sep 17 00:00:00 2001 From: ulfvonbelow Date: Thu, 2 Feb 2023 19:29:52 +0000 Subject: crontab-access: replace with wrapper, rename to crontab-access-real. The wrapper has two purposes: 1. Not being a script, thereby eliminating the issues with setuid scripts. 2. Purging the environment. crontab-access-real has no need for any environment variables to do its work, so to prevent tampering with dynamic linker, libc, or guile, we may as well just unset them all. This wrapper does introduce a requirement for a C compiler. Ideally it would be conditional based on whether the wrapper is even going to be built, but autoconf doesn't like that one bit. Someone with more experience with autotools should sort that out. In the meantime I guess anyone wanting to build without a C compiler being present is going to have to edit configure.ac and re-run bootstrap. * src/crontab-access.in: renamed to src/crontab-access-real.in * src/crontab-access.c.in: new file, wrapper for crontab-access-real. * Makefile.am: inform about crontab-access.c.in and name change to crontab-access-real. Put crontab-access-real in libexecdir. --- configure.ac | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 7ea532f..b79e3c3 100644 --- a/configure.ac +++ b/configure.ac @@ -65,6 +65,14 @@ AC_ARG_ENABLE([multi-user], [Don't Install legacy cron and crontab programs])], [enable_multi_user="$enableval"], [enable_multi_user="yes"]) + +dnl Not possible to run this conditionally? +AC_PROG_CC +dnl AS_IF([test "x$enable_multi_user" = xyes], +dnl [# Need a C compiler to compile setuid wrapper +dnl AC_PROG_CC] +dnl fi + AM_CONDITIONAL([MULTI_USER], [test "x$enable_multi_user" = xyes]) # Configure the various files that mcron uses at runtime. -- cgit v1.2.3