90410f9370
Copy from Base:System/openssh based on submit request 46105 from user anicka OBS-URL: https://build.opensuse.org/request/show/46105 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/openssh?expand=0&rev=48
26 lines
672 B
Diff
26 lines
672 B
Diff
Index: sshd.c
|
|
===================================================================
|
|
--- sshd.c.orig
|
|
+++ sshd.c
|
|
@@ -306,6 +306,7 @@ sighup_handler(int sig)
|
|
static void
|
|
sighup_restart(void)
|
|
{
|
|
+ int i;
|
|
logit("Received SIGHUP; restarting.");
|
|
close_listen_socks();
|
|
close_startup_pipes();
|
|
@@ -1316,7 +1317,11 @@ main(int ac, char **av)
|
|
#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)
|