[openssh-commits] [openssh] 02/02: there's only one sandbox, move to a static global

git+noreply at mindrot.org git+noreply at mindrot.org
Mon Oct 14 14:50:00 AEDT 2024


This is an automated email from the git hooks/post-receive script.

djm pushed a commit to branch master
in repository openssh.

commit f8edf08c258ee2918689872c4702302052729726
Author: Damien Miller <djm at mindrot.org>
AuthorDate: Mon Oct 14 14:49:25 2024 +1100

    there's only one sandbox, move to a static global
---
 sshd-auth.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/sshd-auth.c b/sshd-auth.c
index 57747067..52bbd0b9 100644
--- a/sshd-auth.c
+++ b/sshd-auth.c
@@ -163,6 +163,10 @@ static void do_ssh2_kex(struct ssh *);
 /* Unprivileged user */
 struct passwd *privsep_pw = NULL;
 
+#ifndef HAVE_PLEDGE
+static struct ssh_sandbox *box;
+#endif
+
 /* XXX stub */
 int
 mm_is_monitor(void)
@@ -174,9 +178,8 @@ static void
 privsep_child_demote(void)
 {
 	gid_t gidset[1];
-#ifndef HAVE_PLEDGE
-	struct ssh_sandbox *box = NULL;
 
+#ifndef HAVE_PLEDGE
 	if ((box = ssh_sandbox_init(pmonitor)) == NULL)
 		fatal_f("ssh_sandbox_init failed");
 #endif

-- 
To stop receiving notification emails like this one, please contact
djm at mindrot.org.


More information about the openssh-commits mailing list