From f5f6f50e27440c68e3200b36d349d539217f49a4 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Thu, 7 Mar 2013 20:15:16 +0100 Subject: [PATCH] lib/external/fexec.c: add some parens so that expression is evaluated correctly. --- lib/external/fexec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/external/fexec.c b/lib/external/fexec.c index fb90ee9d..6261f594 100644 --- a/lib/external/fexec.c +++ b/lib/external/fexec.c @@ -52,7 +52,7 @@ pfcexec(struct xbps_handle *xhp, const char *file, const char **argv) * change root directory and exec command. */ if (strcmp(xhp->rootdir, "/")) { - if (geteuid() == 0 && access("bin/sh", X_OK) == 0) { + if ((geteuid() == 0) && (access("bin/sh", X_OK) == 0)) { if (chroot(xhp->rootdir) == -1) { xbps_dbg_printf(xhp, "%s: chroot() " "failed: %s\n", *argv, strerror(errno));