[Bug 277210] jail(8): exec.clean retrieves PWD from user info (can cause services to crash on jail start-up)

From: <bugzilla-noreply_at_freebsd.org>
Date: Thu, 22 Feb 2024 08:06:45 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=277210

--- Comment #7 from Michael Osipov <michaelo@FreeBSD.org> ---
From jail(8):


       exec.clean
               Run commands in a clean environment.  The environment  is  dis-
               carded  except  for HOME, SHELL, TERM and USER.  HOME and SHELL
               are set to the target login's default values.  USER is  set  to
               the  target  login.  TERM is imported from the current environ-
               ment.  The environment variables from the login class  capabil-
               ity database for the target login are also set.

I completely miss the chdir(2) here with PWD. That is the first one to be fixed
even if it gets reverted because it is not documented.

-- 
You are receiving this mail because:
You are the assignee for the bug.