lib/external/fexec.c: add some parens so that expression is evaluated correctly.
This commit is contained in:
parent
5eddf04898
commit
f5f6f50e27
2
lib/external/fexec.c
vendored
2
lib/external/fexec.c
vendored
@ -52,7 +52,7 @@ pfcexec(struct xbps_handle *xhp, const char *file, const char **argv)
|
|||||||
* change root directory and exec command.
|
* change root directory and exec command.
|
||||||
*/
|
*/
|
||||||
if (strcmp(xhp->rootdir, "/")) {
|
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) {
|
if (chroot(xhp->rootdir) == -1) {
|
||||||
xbps_dbg_printf(xhp, "%s: chroot() "
|
xbps_dbg_printf(xhp, "%s: chroot() "
|
||||||
"failed: %s\n", *argv, strerror(errno));
|
"failed: %s\n", *argv, strerror(errno));
|
||||||
|
Loading…
Reference in New Issue
Block a user