summaryrefslogtreecommitdiff
path: root/sshpty.c
diff options
context:
space:
mode:
authorderaadt@openbsd.org <deraadt@openbsd.org>2019-07-04 16:16:51 +0000
committerDamien Miller <djm@mindrot.org>2019-07-05 11:15:30 +1000
commit48cccc275c6a1e91d3f80fdb0dc0d5baf529aeca (patch)
tree05a50c1482ac4062ef85e3ebf8eeff98f0818a63 /sshpty.c
parent8142fcaf9ed8ff66252deecbfd29fc59d5f2df4f (diff)
upstream: stat() returns precisely -1 to indicate error
OpenBSD-Commit-ID: 668e8d022ed4ab847747214f64119e5865365fa1
Diffstat (limited to 'sshpty.c')
-rw-r--r--sshpty.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sshpty.c b/sshpty.c
index 715035257..a625e474e 100644
--- a/sshpty.c
+++ b/sshpty.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: sshpty.c,v 1.32 2019/06/28 13:35:04 deraadt Exp $ */ 1/* $OpenBSD: sshpty.c,v 1.33 2019/07/04 16:16:51 deraadt Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -179,7 +179,7 @@ pty_setowner(struct passwd *pw, const char *tty)
179 * Warn but continue if filesystem is read-only and the uids match/ 179 * Warn but continue if filesystem is read-only and the uids match/
180 * tty is owned by root. 180 * tty is owned by root.
181 */ 181 */
182 if (stat(tty, &st)) 182 if (stat(tty, &st) == -1)
183 fatal("stat(%.100s) failed: %.100s", tty, 183 fatal("stat(%.100s) failed: %.100s", tty,
184 strerror(errno)); 184 strerror(errno));
185 185