From 53091e3bce487ee82e2805a0231e780551561717 Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Sun, 12 Mar 2017 19:39:01 +0000 Subject: Adapt to skalibs-2.5.0.0 --- src/conn-tools/s6-tlsc.c | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) (limited to 'src/conn-tools/s6-tlsc.c') diff --git a/src/conn-tools/s6-tlsc.c b/src/conn-tools/s6-tlsc.c index 3e355f1..fb7272f 100644 --- a/src/conn-tools/s6-tlsc.c +++ b/src/conn-tools/s6-tlsc.c @@ -3,9 +3,7 @@ #include #include #include -#include -#include -#include +#include #include #include #include @@ -52,7 +50,7 @@ int main (int argc, char const *const *argv, char const *const *envp) unsigned int t = 0 ; for (;;) { - register int opt = subgetopt_r(argc, argv, "SsYyv:K:k:Zz6:7:", &l) ; + int opt = subgetopt_r(argc, argv, "SsYyv:K:k:Zz6:7:", &l) ; if (opt == -1) break ; switch (opt) { @@ -90,17 +88,9 @@ int main (int argc, char const *const *argv, char const *const *envp) if (!getuid()) { char const *x = env_get2(envp, "TLS_UID") ; - if (x) - { - uint64 u ; - if (!uint640_scan(x, &u)) strerr_dieinvalid(100, "TLS_UID") ; - uid = (uid_t)u ; - } + if (x && !uid0_scan(x, &uid)) strerr_dieinvalid(100, "TLS_UID") ; x = env_get2(envp, "TLS_GID") ; - if (x) - { - if (!gid0_scan(x, &gid)) strerr_dieinvalid(100, "TLS_GID") ; - } + if (x && !gid0_scan(x, &gid)) strerr_dieinvalid(100, "TLS_GID") ; } return s6tlsc(argv, envp, &tto, preoptions, options, uid, gid, verbosity, servername, fds) ; -- cgit v1.3.1