summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/conn-tools/s6-tcpclient.c3
-rw-r--r--src/conn-tools/s6-tcpserver-access.c6
-rw-r--r--src/conn-tools/s6-tcpserver.c3
-rw-r--r--src/conn-tools/s6-tcpserver4-socketbinder.c3
-rw-r--r--src/conn-tools/s6-tcpserver4.c3
-rw-r--r--src/conn-tools/s6-tcpserver6-socketbinder.c3
-rw-r--r--src/conn-tools/s6-tcpserver6.c3
-rw-r--r--src/conn-tools/s6-tlsclient.c3
-rw-r--r--src/conn-tools/s6-tlsserver.c3
-rw-r--r--src/sbearssl/sbearssl_cert_readbigpem.c2
10 files changed, 11 insertions, 21 deletions
diff --git a/src/conn-tools/s6-tcpclient.c b/src/conn-tools/s6-tcpclient.c
index 47be4a7..062047c 100644
--- a/src/conn-tools/s6-tcpclient.c
+++ b/src/conn-tools/s6-tcpclient.c
@@ -374,6 +374,5 @@ int main (int argc, char const *const *argv)
if (fd_move(6, s) < 0) strerr_diefu2sys(111, "set up fd ", "6") ;
if (fd_copy(7, 6) < 0) strerr_diefu2sys(111, "set up fd ", "7") ;
- pathexec(argv+2) ;
- strerr_dieexec(111, argv[2]) ;
+ xpathexec(argv+2) ;
}
diff --git a/src/conn-tools/s6-tcpserver-access.c b/src/conn-tools/s6-tcpserver-access.c
index e16fe08..720da7e 100644
--- a/src/conn-tools/s6-tcpserver-access.c
+++ b/src/conn-tools/s6-tcpserver-access.c
@@ -379,12 +379,10 @@ int main (int argc, char const *const *argv, char const *const *envp)
if (params.exec.len)
{
char *specialargv[4] = { EXECLINE_EXTBINPREFIX "execlineb", "-c", params.exec.s, 0 } ;
- pathexec_r((char const *const *)specialargv, envp, env_len(envp), params.env.s, params.env.len) ;
- strerr_dieexec(111, specialargv[0]) ;
+ xpathexec_r((char const *const *)specialargv, envp, env_len(envp), params.env.s, params.env.len) ;
}
- pathexec_r(argv, envp, env_len(envp), params.env.s, params.env.len) ;
- strerr_dieexec(111, argv[0]) ;
+ xpathexec_r(argv, envp, env_len(envp), params.env.s, params.env.len) ;
reject:
if (verbosity >= 2)
diff --git a/src/conn-tools/s6-tcpserver.c b/src/conn-tools/s6-tcpserver.c
index 3866b75..1143af7 100644
--- a/src/conn-tools/s6-tcpserver.c
+++ b/src/conn-tools/s6-tcpserver.c
@@ -130,7 +130,6 @@ int main (int argc, char const *const *argv, char const *const *envp)
newargv[m++] = "--" ;
while (*argv) newargv[m++] = *argv++ ;
newargv[m++] = 0 ;
- pathexec_run(newargv[0], newargv, envp) ;
- strerr_dieexec(111, newargv[0]) ;
+ xpathexec_run(newargv[0], newargv, envp) ;
}
}
diff --git a/src/conn-tools/s6-tcpserver4-socketbinder.c b/src/conn-tools/s6-tcpserver4-socketbinder.c
index cc97486..e32eb4f 100644
--- a/src/conn-tools/s6-tcpserver4-socketbinder.c
+++ b/src/conn-tools/s6-tcpserver4-socketbinder.c
@@ -48,6 +48,5 @@ int main (int argc, char const *const *argv, char const *const *envp)
if (backlog && socket_listen(0, backlog) < 0)
strerr_diefu5sys(111, "listen to ", argv[0], ":", argv[1], " ") ;
- pathexec_run(argv[2], argv + 2, envp) ;
- strerr_dieexec(111, argv[2]) ;
+ xpathexec_run(argv[2], argv + 2, envp) ;
}
diff --git a/src/conn-tools/s6-tcpserver4.c b/src/conn-tools/s6-tcpserver4.c
index 6860871..f97d307 100644
--- a/src/conn-tools/s6-tcpserver4.c
+++ b/src/conn-tools/s6-tcpserver4.c
@@ -123,7 +123,6 @@ int main (int argc, char const *const *argv, char const *const *envp)
newargv[m++] = "--" ;
while (*argv) newargv[m++] = *argv++ ;
newargv[m++] = 0 ;
- pathexec_run(newargv[0], newargv, envp) ;
- strerr_dieexec(111, newargv[0]) ;
+ xpathexec_run(newargv[0], newargv, envp) ;
}
}
diff --git a/src/conn-tools/s6-tcpserver6-socketbinder.c b/src/conn-tools/s6-tcpserver6-socketbinder.c
index 4fc3ab4..143bfe9 100644
--- a/src/conn-tools/s6-tcpserver6-socketbinder.c
+++ b/src/conn-tools/s6-tcpserver6-socketbinder.c
@@ -48,6 +48,5 @@ int main (int argc, char const *const *argv, char const *const *envp)
if (backlog && socket_listen(0, backlog) < 0)
strerr_diefu5sys(111, "listen to ", argv[0], ":", argv[1], " ") ;
- pathexec_run(argv[2], argv + 2, envp) ;
- strerr_dieexec(111, argv[2]) ;
+ xpathexec_run(argv[2], argv + 2, envp) ;
}
diff --git a/src/conn-tools/s6-tcpserver6.c b/src/conn-tools/s6-tcpserver6.c
index 8648e8e..f96d45b 100644
--- a/src/conn-tools/s6-tcpserver6.c
+++ b/src/conn-tools/s6-tcpserver6.c
@@ -123,7 +123,6 @@ int main (int argc, char const *const *argv, char const *const *envp)
newargv[m++] = "--" ;
while (*argv) newargv[m++] = *argv++ ;
newargv[m++] = 0 ;
- pathexec_run(newargv[0], newargv, envp) ;
- strerr_dieexec(111, newargv[0]) ;
+ xpathexec_run(newargv[0], newargv, envp) ;
}
}
diff --git a/src/conn-tools/s6-tlsclient.c b/src/conn-tools/s6-tlsclient.c
index 5bcc7e7..267f457 100644
--- a/src/conn-tools/s6-tlsclient.c
+++ b/src/conn-tools/s6-tlsclient.c
@@ -197,7 +197,6 @@ int main (int argc, char const *const *argv, char const *const *envp)
newargv[m++] = "--" ;
while (*argv) newargv[m++] = *argv++ ;
newargv[m++] = 0 ;
- pathexec_run(newargv[0], newargv, envp) ;
- strerr_dieexec(111, newargv[0]) ;
+ xpathexec_run(newargv[0], newargv, envp) ;
}
}
diff --git a/src/conn-tools/s6-tlsserver.c b/src/conn-tools/s6-tlsserver.c
index d6c84f5..fa36226 100644
--- a/src/conn-tools/s6-tlsserver.c
+++ b/src/conn-tools/s6-tlsserver.c
@@ -242,7 +242,6 @@ int main (int argc, char const *const *argv, char const *const *envp)
}
while (*argv) newargv[m++] = *argv++ ;
newargv[m++] = 0 ;
- pathexec_run(newargv[0], newargv, envp) ;
- strerr_dieexec(111, newargv[0]) ;
+ xpathexec_run(newargv[0], newargv, envp) ;
}
}
diff --git a/src/sbearssl/sbearssl_cert_readbigpem.c b/src/sbearssl/sbearssl_cert_readbigpem.c
index 9df5ebd..64ce139 100644
--- a/src/sbearssl/sbearssl_cert_readbigpem.c
+++ b/src/sbearssl/sbearssl_cert_readbigpem.c
@@ -25,8 +25,8 @@ int sbearssl_cert_readbigpem (char const *fn, genalloc *certs, stralloc *sa)
int r ;
if (fd < 0) return -1 ;
r = sbearssl_pem_decode_from_buffer(&b, &pems, sa) ;
- if (r) { fd_close(fd) ; return r ; }
fd_close(fd) ;
+ if (r) return r ;
p = genalloc_s(sbearssl_pemobject, &pems) ;
n = genalloc_len(sbearssl_pemobject, &pems) ;
for (; i < n ; i++)