]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
privsep: Minor correction to prior logic
authorRoy Marples <roy@marples.name>
Sun, 11 Oct 2020 07:47:31 +0000 (08:47 +0100)
committerRoy Marples <roy@marples.name>
Sun, 11 Oct 2020 07:47:31 +0000 (08:47 +0100)
src/privsep.c

index a3db98e04cb0b616db3de5c3ef94027d3273bf02..e9fa463fed6240cb0fcd39b2f99004aa40140e58 100644 (file)
@@ -168,7 +168,7 @@ ps_dropprivs(struct dhcpcd_ctx *ctx)
         * or redirecting stderr to a file. */
        if (ctx->logfile == NULL &&
            (ctx->options & DHCPCD_STARTED ||
-            (ctx->stderr_valid && isatty(STDERR_FILENO) == 1)))
+            !ctx->stderr_valid || isatty(STDERR_FILENO) == 1))
        {
                if (setrlimit(RLIMIT_FSIZE, &rzero) == -1)
                        logerr("setrlimit RLIMIT_FSIZE");