diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2017-03-12 19:39:01 +0000 |
---|---|---|
committer | Laurent Bercot <ska-skaware@skarnet.org> | 2017-03-12 19:39:01 +0000 |
commit | 53091e3bce487ee82e2805a0231e780551561717 (patch) | |
tree | f0fa36ff8eadaf1f01d4510597b5e3a310764dc7 /src/conn-tools/s6-tlsd.c | |
parent | f85b8a70f3b44510a5cf3895bf7357ae90655f65 (diff) | |
download | s6-networking-53091e3bce487ee82e2805a0231e780551561717.tar.xz |
Adapt to skalibs-2.5.0.0
Diffstat (limited to 'src/conn-tools/s6-tlsd.c')
-rw-r--r-- | src/conn-tools/s6-tlsd.c | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/src/conn-tools/s6-tlsd.c b/src/conn-tools/s6-tlsd.c index da90179..d76b423 100644 --- a/src/conn-tools/s6-tlsd.c +++ b/src/conn-tools/s6-tlsd.c @@ -2,9 +2,7 @@ #include <sys/types.h> #include <stdint.h> -#include <skalibs/uint64.h> -#include <skalibs/uint.h> -#include <skalibs/gidstuff.h> +#include <skalibs/types.h> #include <skalibs/sgetopt.h> #include <skalibs/strerr2.h> #include <skalibs/tai.h> @@ -49,7 +47,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:Zz", &l) ; + int opt = subgetopt_r(argc, argv, "SsYyv:K:Zz", &l) ; if (opt == -1) break ; switch (opt) { @@ -72,17 +70,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 s6tlsd(argv, envp, &tto, preoptions, options, uid, gid, verbosity) ; |