From: Todd C. Miller Date: Sat, 19 Feb 2011 13:12:46 +0000 (-0500) Subject: SVR5 systems return non-zero for success on socketpair(), X-Git-Tag: SUDO_1_7_5~6 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a5516f497ed1027273705207fab01563be2125f9;p=sudo SVR5 systems return non-zero for success on socketpair(), check for -1 instead. Closes Bug 469 --HG-- branch : 1.7 --- diff --git a/exec.c b/exec.c index 1fca0ffc5..65a3abefb 100644 --- a/exec.c +++ b/exec.c @@ -268,7 +268,7 @@ sudo_execve(path, argv, envp, uid, cstat, dowait, bgmode) * We communicate with the child over a bi-directional pair of sockets. * Parent sends signal info to child and child sends back wait status. */ - if (socketpair(PF_UNIX, SOCK_DGRAM, 0, sv) != 0) + if (socketpair(PF_UNIX, SOCK_DGRAM, 0, sv) == -1) error(1, "cannot create sockets"); /*