Skip to content

Commit

Permalink
there's only one sandbox, move to a static global
Browse files Browse the repository at this point in the history
  • Loading branch information
djmdjm committed Oct 14, 2024
1 parent 4482f00 commit f8edf08
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions sshd-auth.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
Expand Down

0 comments on commit f8edf08

Please sign in to comment.