diff options
author | Lorenz Kästle <12514511+RincewindsHat@users.noreply.github.com> | 2025-02-25 11:35:34 +0100 |
---|---|---|
committer | Lorenz Kästle <12514511+RincewindsHat@users.noreply.github.com> | 2025-03-07 23:38:50 +0100 |
commit | 9ea4dbc25352c7cb408e392e5ae9011b9b0ff3d6 (patch) | |
tree | 1efedf268de7d76e4edc3ee87df061cf4e4aa86c /plugins | |
parent | add5bfb1e4029e406f7f331407c9d0f28d6d789b (diff) | |
download | monitoring-plugins-9ea4dbc25352c7cb408e392e5ae9011b9b0ff3d6.tar.gz |
check_ssh: move only time relevant stuff in timeout area
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/check_ssh.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/plugins/check_ssh.c b/plugins/check_ssh.c index b73cdf24..3e25910d 100644 --- a/plugins/check_ssh.c +++ b/plugins/check_ssh.c | |||
@@ -75,16 +75,15 @@ int main(int argc, char **argv) { | |||
75 | 75 | ||
76 | check_ssh_config config = tmp_config.config; | 76 | check_ssh_config config = tmp_config.config; |
77 | 77 | ||
78 | /* initialize alarm signal handling */ | ||
79 | signal(SIGALRM, socket_timeout_alarm_handler); | ||
80 | |||
81 | alarm(socket_timeout); | ||
82 | |||
83 | mp_check overall = mp_check_init(); | 78 | mp_check overall = mp_check_init(); |
84 | if (config.output_format_is_set) { | 79 | if (config.output_format_is_set) { |
85 | overall.format = config.output_format; | 80 | overall.format = config.output_format; |
86 | } | 81 | } |
87 | 82 | ||
83 | /* initialize alarm signal handling */ | ||
84 | signal(SIGALRM, socket_timeout_alarm_handler); | ||
85 | alarm(socket_timeout); | ||
86 | |||
88 | /* ssh_connect exits if error is found */ | 87 | /* ssh_connect exits if error is found */ |
89 | ssh_connect(&overall, config.server_name, config.port, config.remote_version, config.remote_protocol); | 88 | ssh_connect(&overall, config.server_name, config.port, config.remote_version, config.remote_protocol); |
90 | 89 | ||