From e5bcc5f6820b1cf0c44f65362ad36e7c1cbb3c90 Mon Sep 17 00:00:00 2001 From: bol-van Date: Wed, 13 Nov 2024 17:35:50 +0300 Subject: [PATCH] nfqws: fix autohostlist debug chown --- nfq/nfqws.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nfq/nfqws.c b/nfq/nfqws.c index 0bb2ca3..6d6eaf5 100644 --- a/nfq/nfqws.c +++ b/nfq/nfqws.c @@ -2023,7 +2023,7 @@ int main(int argc, char **argv) #ifndef __CYGWIN__ if (params.debug_target == LOG_TARGET_FILE && params.droproot && chown(params.debug_logfile, params.uid, -1)) fprintf(stderr, "could not chown %s. log file may not be writable after privilege drop\n", params.debug_logfile); - if (params.droproot && chown(params.hostlist_auto_debuglog, params.uid, -1)) + if (params.droproot && *params.hostlist_auto_debuglog && chown(params.hostlist_auto_debuglog, params.uid, -1)) DLOG_ERR("could not chown %s. auto hostlist debug log may not be writable after privilege drop\n", params.hostlist_auto_debuglog); #endif LIST_FOREACH(dpl, ¶ms.desync_profiles, next)