=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/ssh/sshpty.c,v retrieving revision 1.32 retrieving revision 1.33 diff -u -r1.32 -r1.33 --- src/usr.bin/ssh/sshpty.c 2019/06/28 13:35:04 1.32 +++ src/usr.bin/ssh/sshpty.c 2019/07/04 16:16:51 1.33 @@ -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 * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -149,7 +149,7 @@ * 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));