summaryrefslogtreecommitdiff
path: root/src/conn-tools
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2019-12-23 13:05:25 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2019-12-23 13:05:25 +0000
commit07491df186d562d0efa6a7fca2b7f8d07dbd0652 (patch)
treed66a8709a82b4c621c5f21a7f346362e8a243a3f /src/conn-tools
parent8bbfc319248c0cbeb57edc45f26d1c972d32f505 (diff)
downloads6-07491df186d562d0efa6a7fca2b7f8d07dbd0652.tar.xz
Make execline dependency optional
This includes: - adding a configure option to disable execline support - duplicating el_semicolon() and el_getstrict() into the s6 library when execline is disabled at build time, making a compat shim and using it where needed (s6-svlisten, s6-ftrig-listen) - Creating alternatives for execlineb script spawning: * s6-log: '?' directive (done in the previous commit) * s6-notifyoncheck: require hardcoding the check in ./data/check * s6-ipcserver-access: no support for exec files, add a warning - Updating the relevant parts of the doc --enable-execline will remain the default, and whiners can choke on their tears.
Diffstat (limited to 'src/conn-tools')
-rw-r--r--src/conn-tools/s6-ipcserver-access.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/conn-tools/s6-ipcserver-access.c b/src/conn-tools/s6-ipcserver-access.c
index 9d78620..e3f6ac2 100644
--- a/src/conn-tools/s6-ipcserver-access.c
+++ b/src/conn-tools/s6-ipcserver-access.c
@@ -11,9 +11,14 @@
#include <skalibs/env.h>
#include <skalibs/djbunix.h>
#include <skalibs/webipc.h>
-#include <execline/config.h>
+
+#include <s6/config.h>
#include <s6/accessrules.h>
+#ifdef S6_USE_EXECLINE
+#include <execline/config.h>
+#endif
+
#define USAGE "s6-ipcserver-access [ -v verbosity ] [ -e | -E ] [ -l localname ] [ -i rulesdir | -x rulesfile ] prog..."
static unsigned int verbosity = 1 ;
@@ -204,9 +209,13 @@ int main (int argc, char const *const *argv, char const *const *envp)
}
if (params.exec.len)
+#ifdef S6_USE_EXECLINE
{
char *specialargv[4] = { EXECLINE_EXTBINPREFIX "execlineb", "-Pc", params.exec.s, 0 } ;
xpathexec_r((char const *const *)specialargv, envp, env_len(envp), params.env.s, params.env.len) ;
}
- else xpathexec_r(argv, envp, env_len(envp), params.env.s, params.env.len) ;
+#else
+ strerr_warnw1x("exec file found but ignored because s6 was compiled without execline support!") ;
+#endif
+ xpathexec_r(argv, envp, env_len(envp), params.env.s, params.env.len) ;
}