[openssh-commits] [openssh] branch master updated: Check for SA_RESTART before using it.

git+noreply at mindrot.org git+noreply at mindrot.org
Thu Jul 25 18:00:37 AEST 2024


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

dtucker pushed a commit to branch master
in repository openssh.

The following commit(s) were added to refs/heads/master by this push:
     new b05fda22 Check for SA_RESTART before using it.
b05fda22 is described below

commit b05fda224bbcd2f641254534ed2175c42487f3c8
Author: Darren Tucker <dtucker at dtucker.net>
AuthorDate: Thu Jul 25 17:59:35 2024 +1000

    Check for SA_RESTART before using it.
    
    ok djm@
---
 sshd-session.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/sshd-session.c b/sshd-session.c
index 52e7bd82..1060ff7d 100644
--- a/sshd-session.c
+++ b/sshd-session.c
@@ -214,7 +214,9 @@ grace_alarm_handler(int sig)
 		memset(&sa, 0, sizeof(sa));
 		sa.sa_handler = SIG_IGN;
 		sigfillset(&sa.sa_mask);
+#if defined(SA_RESTART)
 		sa.sa_flags = SA_RESTART;
+#endif
 		(void)sigaction(SIGTERM, &sa, NULL);
 		kill(0, SIGTERM);
 	}

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


More information about the openssh-commits mailing list