From 47cbbb1619ace4013856843ef8f7d68279c74faa Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Sun, 22 Nov 2020 00:16:06 +0000 Subject: Add documentation, fix tiny privdrop bug --- src/sbearssl/sbearssl_drop.c | 4 ++-- src/stls/stls_drop.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/sbearssl/sbearssl_drop.c b/src/sbearssl/sbearssl_drop.c index 2d826af..31e5f49 100644 --- a/src/sbearssl/sbearssl_drop.c +++ b/src/sbearssl/sbearssl_drop.c @@ -12,8 +12,8 @@ void sbearssl_drop (void) { if (!getuid()) { - uid_t uid ; - gid_t gid ; + uid_t uid = 0 ; + gid_t gid = 0 ; char const *x = getenv("TLS_UID") ; if (x && !uid0_scan(x, &uid)) strerr_dieinvalid(100, "TLS_UID") ; x = getenv("TLS_GID") ; diff --git a/src/stls/stls_drop.c b/src/stls/stls_drop.c index d1e6831..7fc1bc5 100644 --- a/src/stls/stls_drop.c +++ b/src/stls/stls_drop.c @@ -12,8 +12,8 @@ void stls_drop (void) { if (!getuid()) { - uid_t uid ; - gid_t gid ; + uid_t uid = 0 ; + gid_t gid = 0 ; char const *x = getenv("TLS_UID") ; if (x && !uid0_scan(x, &uid)) strerr_dieinvalid(100, "TLS_UID") ; x = getenv("TLS_GID") ; -- cgit v1.2.3