summaryrefslogtreecommitdiffstats
path: root/src/tty-ask-password-agent
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2024-02-23 15:03:49 +0100
committerVito Caputo <vcaputo@pengaru.com>2024-02-23 18:35:12 +0100
commitdb7136ec739fa48a7767d77b2b2cfa633267a62a (patch)
tree566499311fb00de9b1a2e43c94996f88576d8821 /src/tty-ask-password-agent
parentsignal-util: use RET_NERRNO() + RET_GATHER() more (diff)
downloadsystemd-db7136ec739fa48a7767d77b2b2cfa633267a62a.tar.xz
systemd-db7136ec739fa48a7767d77b2b2cfa633267a62a.zip
signal-util: imply sentinel -1 in sigprocmask_many() + sigset_add_many() args list
Diffstat (limited to 'src/tty-ask-password-agent')
-rw-r--r--src/tty-ask-password-agent/tty-ask-password-agent.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tty-ask-password-agent/tty-ask-password-agent.c b/src/tty-ask-password-agent/tty-ask-password-agent.c
index df979be5cd..31b284b502 100644
--- a/src/tty-ask-password-agent/tty-ask-password-agent.c
+++ b/src/tty-ask-password-agent/tty-ask-password-agent.c
@@ -356,7 +356,7 @@ static int process_and_watch_password_files(bool watch) {
(void) mkdir_p_label("/run/systemd/ask-password", 0755);
assert_se(sigemptyset(&mask) >= 0);
- assert_se(sigset_add_many(&mask, SIGTERM, -1) >= 0);
+ assert_se(sigset_add_many(&mask, SIGTERM) >= 0);
assert_se(sigprocmask(SIG_SETMASK, &mask, NULL) >= 0);
if (watch) {
@@ -556,7 +556,7 @@ static int ask_on_this_console(const char *tty, pid_t *ret_pid, char **arguments
assert_se(sigaction(SIGCHLD, &sigchld, NULL) >= 0);
assert_se(sigaction(SIGHUP, &sighup, NULL) >= 0);
- assert_se(sigprocmask_many(SIG_UNBLOCK, NULL, SIGHUP, SIGCHLD, -1) >= 0);
+ assert_se(sigprocmask_many(SIG_UNBLOCK, NULL, SIGHUP, SIGCHLD) >= 0);
r = safe_fork("(sd-passwd)", FORK_RESET_SIGNALS|FORK_LOG, ret_pid);
if (r < 0)