summaryrefslogtreecommitdiffstats
path: root/usr.bin/file/file.c
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2015-10-05 06:23:34 +0000
committerderaadt <deraadt@openbsd.org>2015-10-05 06:23:34 +0000
commitf14940cd2354d563e153a03b46da69a5523ff19d (patch)
treee1e15f9b3f4b55bc9c78dea0e9c5f02af109c5cf /usr.bin/file/file.c
parentuse the normal -1 check for tame failure (diff)
downloadwireguard-openbsd-f14940cd2354d563e153a03b46da69a5523ff19d.tar.xz
wireguard-openbsd-f14940cd2354d563e153a03b46da69a5523ff19d.zip
use the normal -1 check for tame failure
Diffstat (limited to 'usr.bin/file/file.c')
-rw-r--r--usr.bin/file/file.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/file/file.c b/usr.bin/file/file.c
index 4fd132ef935..f6e13e9bca1 100644
--- a/usr.bin/file/file.c
+++ b/usr.bin/file/file.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: file.c,v 1.49 2015/10/04 07:25:59 nicm Exp $ */
+/* $OpenBSD: file.c,v 1.50 2015/10/05 06:23:34 deraadt Exp $ */
/*
* Copyright (c) 2015 Nicholas Marriott <nicm@openbsd.org>
@@ -351,7 +351,7 @@ child(int fd, pid_t parent, int argc, char **argv)
int i, idx;
size_t len, width = 0;
- if (tame("stdio cmsg getpw proc", NULL) != 0)
+ if (tame("stdio cmsg getpw proc", NULL) == -1)
err(1, "tame");
if (geteuid() == 0) {
@@ -366,7 +366,7 @@ child(int fd, pid_t parent, int argc, char **argv)
err(1, "setresuid");
}
- if (tame("stdio cmsg", NULL) != 0)
+ if (tame("stdio cmsg", NULL) == -1)
err(1, "tame");
m = magic_load(magicfp, magicpath, cflag || Wflag);