[Bug 529] sshd doesn't work correctly after SIGHUP
bugzilla-daemon at mindrot.org
bugzilla-daemon at mindrot.org
Wed Apr 2 21:52:17 EST 2003
http://bugzilla.mindrot.org/show_bug.cgi?id=529
Summary: sshd doesn't work correctly after SIGHUP
Product: Portable OpenSSH
Version: 3.6p1
Platform: All
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: sshd
AssignedTo: openssh-unix-dev at mindrot.org
ReportedBy: postadal at suse.cz
In portopenssh-3.6p1-vs-openbsd.diff.gz is bug in patch of sshd.c
diff -ruN --exclude CVS ssh-openbsd-2003032600/sshd.c openssh-3.6p1/sshd.c
--- ssh-openbsd-2003032600/sshd.c 2003-03-26 16:04:08.000000000 +1100
+++ openssh-3.6p1/sshd.c 2003-03-10 11:38:10.000000000 +1100
@@ -804,8 +821,23 @@
Key *key;
int ret, key_used = 0;
- /* Save argv. */
+#ifdef HAVE_SECUREWARE
+ (void)set_auth_parameters(ac, av);
+#endif
+ __progname = get_progname(av[0]);
+ init_rng();
+
+ /* Save argv. Duplicate so setproctitle emulation doesn't clobber it */
+ saved_argc = ac;
saved_argv = av;
+ saved_argv = xmalloc(sizeof(*saved_argv) * ac);
+ for (i = 0; i < ac; i++)
+ saved_argv[i] = xstrdup(av[i]);
+
+#ifndef HAVE_SETPROCTITLE
-------------------
If sshd uses to reload service after receive SIGHUP, it use execve to start sshd
with same parameters, which are save in saved_argv (note: it is missing in older
release, which caused problems, if some agrumends was passed to sshd throught
command line).,
therefore saved_argv must be terminated by a NULL pointer!
Fixed version:
saved_argv = xmalloc(sizeof(*saved_argv) * (ac + 1));
^^^^^^^
for (i = 0; i < ac; i++)
saved_argv[i] = xstrdup(av[i]);
saved_argv[ac] = NULL;
^^^^^^^^^^^^^^^^^^^^^^
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
More information about the openssh-unix-dev
mailing list