[openssh-commits] [openssh] branch master updated: put back some portable bits for sshd-auth.c
git+noreply at mindrot.org
git+noreply at mindrot.org
Mon Oct 14 17:16:53 AEDT 2024
This is an automated email from the git hooks/post-receive script.
djm pushed a commit to branch master
in repository openssh.
The following commit(s) were added to refs/heads/master by this push:
new 164ea438 put back some portable bits for sshd-auth.c
164ea438 is described below
commit 164ea4380564a2a83713eacf71908e3946e5e4e4
Author: Damien Miller <djm at mindrot.org>
AuthorDate: Mon Oct 14 17:16:41 2024 +1100
put back some portable bits for sshd-auth.c
---
sshd-auth.c | 23 ++++++++++++++++++++---
1 file changed, 20 insertions(+), 3 deletions(-)
diff --git a/sshd-auth.c b/sshd-auth.c
index 52bbd0b9..53658cf1 100644
--- a/sshd-auth.c
+++ b/sshd-auth.c
@@ -42,7 +42,9 @@
#include <errno.h>
#include <fcntl.h>
#include <netdb.h>
-#include <paths.h>
+#ifdef HAVE_PATHS_H
+# include <paths.h>
+#endif
#include <pwd.h>
#include <grp.h>
#include <signal.h>
@@ -456,8 +458,23 @@ main(int ac, char **av)
sigemptyset(&sigmask);
sigprocmask(SIG_SETMASK, &sigmask, NULL);
- /* Save argv. */
- saved_argv = av;
+#ifdef HAVE_SECUREWARE
+ (void)set_auth_parameters(ac, av);
+#endif
+ __progname = ssh_get_progname(av[0]);
+
+ /* Save argv. Duplicate so setproctitle emulation doesn't clobber it */
+ saved_argc = ac;
+ saved_argv = xcalloc(ac + 1, sizeof(*saved_argv));
+ for (i = 0; (int)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;
+#endif
/* Ensure that fds 0, 1 and 2 are open or directed to /dev/null */
sanitise_stdfd();
--
To stop receiving notification emails like this one, please contact
djm at mindrot.org.
More information about the openssh-commits
mailing list