2007-01-07 17:26:05 +01:00
|
|
|
--- sshd.c
|
|
|
|
+++ sshd.c
|
2009-03-03 22:42:45 +01:00
|
|
|
@@ -304,6 +304,7 @@
|
2007-01-07 17:26:05 +01:00
|
|
|
static void
|
|
|
|
sighup_restart(void)
|
|
|
|
{
|
|
|
|
+ int i;
|
|
|
|
logit("Received SIGHUP; restarting.");
|
|
|
|
close_listen_socks();
|
|
|
|
close_startup_pipes();
|
2009-03-03 22:42:45 +01:00
|
|
|
@@ -1269,7 +1270,11 @@
|
2007-01-07 17:26:05 +01:00
|
|
|
#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)
|