[openssh-commits] [openssh] 02/03: upstream: stat() returns precisely -1 to indicate error

git+noreply at mindrot.org git+noreply at mindrot.org
Fri Jul 5 11:15:38 AEST 2019


This is an automated email from the git hooks/post-receive script.

djm pushed a commit to branch master
in repository openssh.

commit 48cccc275c6a1e91d3f80fdb0dc0d5baf529aeca
Author: deraadt at openbsd.org <deraadt at openbsd.org>
Date:   Thu Jul 4 16:16:51 2019 +0000

    upstream: stat() returns precisely -1 to indicate error
    
    OpenBSD-Commit-ID: 668e8d022ed4ab847747214f64119e5865365fa1
---
 sshpty.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sshpty.c b/sshpty.c
index 71503525..a625e474 100644
--- a/sshpty.c
+++ b/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 at cs.hut.fi>
  * Copyright (c) 1995 Tatu Ylonen <ylo at cs.hut.fi>, Espoo, Finland
@@ -179,7 +179,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));
 

-- 
To stop receiving notification emails like this one, please contact
djm at mindrot.org.


More information about the openssh-commits mailing list