diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2020-11-21 10:56:01 +0000 |
---|---|---|
committer | Laurent Bercot <ska-skaware@skarnet.org> | 2020-11-21 10:56:01 +0000 |
commit | 2269af1457817b7a3b9b51cc0512d5f29e1fc7a5 (patch) | |
tree | 2960cad413d26ea6c32355f4bcd9885b31281b73 /src | |
parent | 5c2880becc94141b8035b3488b6bd60696011308 (diff) | |
download | s6-networking-2269af1457817b7a3b9b51cc0512d5f29e1fc7a5.tar.xz |
Prepare for 2.4.0.0
Diffstat (limited to 'src')
-rw-r--r-- | src/conn-tools/s6-tcpserver-access.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/conn-tools/s6-tcpserver-access.c b/src/conn-tools/s6-tcpserver-access.c index b09a2b8..ec2ac63 100644 --- a/src/conn-tools/s6-tcpserver-access.c +++ b/src/conn-tools/s6-tcpserver-access.c @@ -4,6 +4,7 @@ #include <stdint.h> #include <unistd.h> #include <errno.h> + #include <skalibs/gccattributes.h> #include <skalibs/types.h> #include <skalibs/strerr2.h> @@ -18,11 +19,17 @@ #include <skalibs/socket.h> #include <skalibs/ip46.h> #include <skalibs/unix-timed.h> -#include <execline/config.h> + #include <s6/accessrules.h> #include <s6-dns/s6dns.h> + +#include <s6-networking/config.h> #include <s6-networking/ident.h> +#ifdef S6_NETWORKING_USE_EXECLINE +#include <execline/config.h> +#endif + #define USAGE "s6-tcpserver-access [ -v verbosity ] [ -W | -w ] [ -D | -d ] [ -H | -h ] [ -R | -r ] [ -P | -p ] [ -l localname ] [ -B banner ] [ -t timeout ] [ -i rulesdir | -x rulesfile ] prog..." #define dieusage() strerr_dieusage(100, USAGE) #define dienomem() strerr_diefu1sys(111, "update environment") @@ -378,10 +385,14 @@ int main (int argc, char const *const *argv, char const *const *envp) stralloc_free(&modifs) ; if (verbosity) log_accept(getpid(), &remoteip) ; if (params.exec.len) +#ifdef S6_NETWORKING_USE_EXECLINE { char *specialargv[4] = { EXECLINE_EXTBINPREFIX "execlineb", "-c", params.exec.s, 0 } ; xpathexec_r((char const *const *)specialargv, envp, env_len(envp), params.env.s, params.env.len) ; } +#else + strerr_warnw1x("exec file found but ignored because s6-networking was compiled without execline support!") ; +#endif xpathexec_r(argv, envp, env_len(envp), params.env.s, params.env.len) ; |