diff options
author | dtucker@openbsd.org <dtucker@openbsd.org> | 2020-01-23 07:10:22 +0000 |
---|---|---|
committer | Darren Tucker <dtucker@dtucker.net> | 2020-01-23 18:51:25 +1100 |
commit | 3bf2a6ac791d64046a537335a0f1d5e43579c5ad (patch) | |
tree | 76fcc0f1be306541c074be4aed3aca66023f0962 /auth.c | |
parent | e027c044c796f3a01081a91bee55741204283f28 (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 'auth.c')
-rw-r--r-- | auth.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: auth.c,v 1.144 2019/12/16 13:58:53 tobhe Exp $ */ | 1 | /* $OpenBSD: auth.c,v 1.145 2020/01/23 07:10:22 dtucker Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2000 Markus Friedl. All rights reserved. | 3 | * Copyright (c) 2000 Markus Friedl. All rights reserved. |
4 | * | 4 | * |
@@ -921,7 +921,7 @@ subprocess(const char *tag, struct passwd *pw, const char *command, | |||
921 | child_set_env(&child_env, &envsize, "LANG", cp); | 921 | child_set_env(&child_env, &envsize, "LANG", cp); |
922 | 922 | ||
923 | for (i = 0; i < NSIG; i++) | 923 | for (i = 0; i < NSIG; i++) |
924 | signal(i, SIG_DFL); | 924 | ssh_signal(i, SIG_DFL); |
925 | 925 | ||
926 | if ((devnull = open(_PATH_DEVNULL, O_RDWR)) == -1) { | 926 | if ((devnull = open(_PATH_DEVNULL, O_RDWR)) == -1) { |
927 | error("%s: open %s: %s", tag, _PATH_DEVNULL, | 927 | error("%s: open %s: %s", tag, _PATH_DEVNULL, |