diff options
author | 2019-07-04 16:16:51 +0000 | |
---|---|---|
committer | 2019-07-04 16:16:51 +0000 | |
commit | c1bee33d1f8096f01696fb3c3afdad25051a58fe (patch) | |
tree | ef01a54f78f2ef5d088c811982a3da4e094cdd1e /usr.bin/ssh/sshpty.c | |
parent | PKG_TMPDIR now defaults to /tmp instead of /var/tmp (diff) | |
download | wireguard-openbsd-c1bee33d1f8096f01696fb3c3afdad25051a58fe.tar.xz wireguard-openbsd-c1bee33d1f8096f01696fb3c3afdad25051a58fe.zip |
stat() returns precisely -1 to indicate error
Diffstat (limited to 'usr.bin/ssh/sshpty.c')
-rw-r--r-- | usr.bin/ssh/sshpty.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/ssh/sshpty.c b/usr.bin/ssh/sshpty.c index 8baadf62eb0..5eeffb89d6e 100644 --- a/usr.bin/ssh/sshpty.c +++ b/usr.bin/ssh/sshpty.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sshpty.c,v 1.32 2019/06/28 13:35:04 deraadt Exp $ */ +/* $OpenBSD: sshpty.c,v 1.33 2019/07/04 16:16:51 deraadt Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland @@ -149,7 +149,7 @@ pty_setowner(struct passwd *pw, const char *tty) * Warn but continue if filesystem is read-only and the uids match/ * tty is owned by root. */ - if (stat(tty, &st)) + if (stat(tty, &st) == -1) fatal("stat(%.100s) failed: %.100s", tty, strerror(errno)); |