Skip to content

Commit

Permalink
Internal Change.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 691819995
Change-Id: Ib2fcda53766c60d8b5eba2c2420641916688e294
  • Loading branch information
okunz authored and copybara-github committed Oct 31, 2024
1 parent 0c9af2f commit 94ec02b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions sandboxed_api/sandbox2/namespace.cc
Original file line number Diff line number Diff line change
Expand Up @@ -237,9 +237,10 @@ void Namespace::InitializeNamespaces(uid_t uid, gid_t gid, int32_t clone_flags,
SAPI_RAW_PCHECK(chdir("/") != -1, "chdir / after chrooting real root");
}

SAPI_RAW_PCHECK(mount("", "/proc", "proc", MS_NODEV | MS_NOEXEC | MS_NOSUID,
nullptr) != -1,
"Could not mount a new /proc"
SAPI_RAW_PCHECK(
mount("", "/proc", "proc", MS_NODEV | MS_NOEXEC | MS_NOSUID, nullptr) !=
-1,
"Could not mount a new /proc"
);

if (clone_flags & CLONE_NEWNET) {
Expand Down

0 comments on commit 94ec02b

Please sign in to comment.