[openssh-commits] [openssh] 01/04: upstream: Check return value from fctnl and warn on failure.

git+noreply at mindrot.org git+noreply at mindrot.org
Fri Mar 3 14:50:53 AEDT 2023


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

dtucker pushed a commit to branch master
in repository openssh.

commit 32755a98c29114b13f4c9d47454bbb265b932ad7
Author: dtucker at openbsd.org <dtucker at openbsd.org>
Date:   Fri Mar 3 02:34:29 2023 +0000

    upstream: Check return value from fctnl and warn on failure.
    
    Spotted by Coverity, ok djm@
    
    OpenBSD-Commit-ID: 2097c7db3cf657f1e3a6c5077041bacc63143cab
---
 sshconnect2.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/sshconnect2.c b/sshconnect2.c
index f0e6e662..5b232e1b 100644
--- a/sshconnect2.c
+++ b/sshconnect2.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sshconnect2.c,v 1.362 2023/02/17 04:22:50 dtucker Exp $ */
+/* $OpenBSD: sshconnect2.c,v 1.363 2023/03/03 02:34:29 dtucker Exp $ */
 /*
  * Copyright (c) 2000 Markus Friedl.  All rights reserved.
  * Copyright (c) 2008 Damien Miller.  All rights reserved.
@@ -2075,7 +2075,8 @@ ssh_keysign(struct ssh *ssh, struct sshkey *key, u_char **sigp, size_t *lenp,
 		if (dup2(sock, STDERR_FILENO + 1) == -1)
 			fatal_f("dup2: %s", strerror(errno));
 		sock = STDERR_FILENO + 1;
-		fcntl(sock, F_SETFD, 0);	/* keep the socket on exec */
+		if (fcntl(sock, F_SETFD, 0) == -1) /* keep the socket on exec */
+			debug3_f("fcntl F_SETFD: %s", strerror(errno));
 		closefrom(sock + 1);
 
 		debug3_f("[child] pid=%ld, exec %s",

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


More information about the openssh-commits mailing list