summaryrefslogtreecommitdiff
path: root/readconf.c
diff options
context:
space:
mode:
authordtucker@openbsd.org <dtucker@openbsd.org>2020-01-23 07:10:22 +0000
committerDarren Tucker <dtucker@dtucker.net>2020-01-23 18:51:25 +1100
commit3bf2a6ac791d64046a537335a0f1d5e43579c5ad (patch)
tree76fcc0f1be306541c074be4aed3aca66023f0962 /readconf.c
parente027c044c796f3a01081a91bee55741204283f28 (diff)
upstream: Replace all calls to signal(2) with a wrapper around
sigaction(2). This wrapper blocks all other signals during the handler preventing races between handlers, and sets SA_RESTART which should reduce the potential for short read/write operations. OpenBSD-Commit-ID: 5e047663fd77a40d7b07bdabe68529df51fd2519
Diffstat (limited to 'readconf.c')
-rw-r--r--readconf.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/readconf.c b/readconf.c
index ff551c856..59443bfdb 100644
--- a/readconf.c
+++ b/readconf.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: readconf.c,v 1.320 2020/01/23 02:46:49 dtucker Exp $ */ 1/* $OpenBSD: readconf.c,v 1.321 2020/01/23 07:10:22 dtucker 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
@@ -528,7 +528,7 @@ execute_in_shell(const char *cmd)
528 execv(argv[0], argv); 528 execv(argv[0], argv);
529 error("Unable to execute '%.100s': %s", cmd, strerror(errno)); 529 error("Unable to execute '%.100s': %s", cmd, strerror(errno));
530 /* Die with signal to make this error apparent to parent. */ 530 /* Die with signal to make this error apparent to parent. */
531 signal(SIGTERM, SIG_DFL); 531 ssh_signal(SIGTERM, SIG_DFL);
532 kill(getpid(), SIGTERM); 532 kill(getpid(), SIGTERM);
533 _exit(1); 533 _exit(1);
534 } 534 }