6cd875acfc
- spec file cleanup (don't pointelssly build whole OpenSSH) - spec file and patch cleanup * removing obsoleted auditing patch (openssh-%{version}-audit.patch) - added patches from SLE * GSSAPI key exchange * FIPS enablement (currently disabled) * small bugfixes - split the LDAP helper into a separate package: openssh-akc-ldap OBS-URL: https://build.opensuse.org/request/show/199679 OBS-URL: https://build.opensuse.org/package/show/network/openssh?expand=0&rev=55
47 lines
1.3 KiB
Diff
47 lines
1.3 KiB
Diff
# related to bnc#49845, upstream bug #529
|
|
|
|
diff --git a/openssh-6.2p2/sshd.c b/openssh-6.2p2/sshd.c
|
|
--- a/openssh-6.2p2/sshd.c
|
|
+++ b/openssh-6.2p2/sshd.c
|
|
@@ -303,16 +303,17 @@ sighup_handler(int sig)
|
|
|
|
/*
|
|
* Called from the main program after receiving SIGHUP.
|
|
* Restarts the server.
|
|
*/
|
|
static void
|
|
sighup_restart(void)
|
|
{
|
|
+ int i;
|
|
logit("Received SIGHUP; restarting.");
|
|
close_listen_socks();
|
|
close_startup_pipes();
|
|
alarm(0); /* alarm timer persists across exec */
|
|
signal(SIGHUP, SIG_IGN); /* will be restored after exec */
|
|
execv(saved_argv[0], saved_argv);
|
|
logit("RESTART FAILED: av[0]='%.100s', error: %.100s.", saved_argv[0],
|
|
strerror(errno));
|
|
@@ -1355,17 +1356,21 @@ main(int ac, char **av)
|
|
saved_argv = xcalloc(ac + 1, sizeof(*saved_argv));
|
|
for (i = 0; i < ac; i++)
|
|
saved_argv[i] = xstrdup(av[i]);
|
|
saved_argv[i] = NULL;
|
|
|
|
#ifndef HAVE_SETPROCTITLE
|
|
/* Prepare for later setproctitle emulation */
|
|
compat_init_setproctitle(ac, av);
|
|
- av = saved_argv;
|
|
+
|
|
+ av = xmalloc(sizeof(*saved_argv) * (saved_argc + 1));
|
|
+ for (i = 0; i < saved_argc; i++)
|
|
+ av[i] = xstrdup(saved_argv[i]);
|
|
+ av[i] = NULL;
|
|
#endif
|
|
|
|
if (geteuid() == 0 && setgroups(0, NULL) == -1)
|
|
debug("setgroups(): %.200s", strerror(errno));
|
|
|
|
/* Ensure that fds 0, 1 and 2 are open or directed to /dev/null */
|
|
sanitise_stdfd();
|
|
|