forked from pool/openssh
6c861e0b33
- remaining patches that were still missing since the update to 7.2p2 (FATE#319675): [openssh-7.2p2-disable_openssl_abi_check.patch] - fix forwarding with IPv6 addresses in DISPLAY (bnc#847710) [openssh-7.2p2-IPv6_X_forwarding.patch] - ignore PAM environment when using login (bsc#975865, CVE-2015-8325) [openssh-7.2p2-ignore_PAM_with_UseLogin.patch] - limit accepted password length (prevents possible DoS) (bsc#992533, CVE-2016-6515) [openssh-7.2p2-limit_password_length.patch] - Prevent user enumeration through the timing of password processing (bsc#989363, CVE-2016-6210) [openssh-7.2p2-prevent_timing_user_enumeration.patch] - Add auditing for PRNG re-seeding [openssh-7.2p2-audit_seed_prng.patch] OBS-URL: https://build.opensuse.org/request/show/433779 OBS-URL: https://build.opensuse.org/package/show/network/openssh?expand=0&rev=113
27 lines
897 B
Diff
27 lines
897 B
Diff
# HG changeset patch
|
|
# Parent 7ce81a30bb196401c63782b646d8a6d511ddec4b
|
|
Do not write a PID file when not daemonizing (e.g. when running from systemd)
|
|
|
|
diff --git a/openssh-7.2p2/sshd.c b/openssh-7.2p2/sshd.c
|
|
--- a/openssh-7.2p2/sshd.c
|
|
+++ b/openssh-7.2p2/sshd.c
|
|
@@ -2107,17 +2107,17 @@ main(int ac, char **av)
|
|
signal(SIGCHLD, main_sigchld_handler);
|
|
signal(SIGTERM, sigterm_handler);
|
|
signal(SIGQUIT, sigterm_handler);
|
|
|
|
/*
|
|
* Write out the pid file after the sigterm handler
|
|
* is setup and the listen sockets are bound
|
|
*/
|
|
- if (options.pid_file != NULL && !debug_flag) {
|
|
+ if (!no_daemon_flag && options.pid_file != NULL && !debug_flag) {
|
|
FILE *f = fopen(options.pid_file, "w");
|
|
|
|
if (f == NULL) {
|
|
error("Couldn't create pid file \"%s\": %s",
|
|
options.pid_file, strerror(errno));
|
|
} else {
|
|
fprintf(f, "%ld\n", (long) getpid());
|
|
fclose(f);
|