commit | 21dd3fdd0052a60a2fc73ceaf9622a456fd94ad2 | [log] [tgz] |
---|---|---|
author | Betul Soysal <betuls@google.com> | Fri Apr 10 15:16:01 2020 -0700 |
committer | Commit Bot <commit-bot@chromium.org> | Fri Apr 17 09:12:20 2020 +0000 |
tree | 95efb90f0ea00d4d0a75fbb2d9470faec8cf8ce6 | |
parent | 3e7c1907eb7ac177638a168e181cbdf1cf0caf8a [diff] |
libbrillo: Fix the mount namespace creation MountNamespace::Create() creates the mount namespace by first unsharing a new mount namespace and then bind mounting the /proc/self/ns/mnt file of that namespace to the provided path. However, mount namespaces do not allow bind mounting /proc/[pid]/ns/mnt file if the process is in the same mount namespace. This CL fixes this bug in the existing code by moving the mount operation to the parent process from the child process where a new namespace is unshared. BUG=chromium:1052197 TEST=FEATURES=test emerge-betty libbrillo TEST=USE="user_session_isolation" emerge-betty libbrillo chromeos-login TEST=cros deploy --board=betty localhost:9222 libbrillo chromeos-login system boots and login success PID=pgrep -o -f /opt/google/chrome readlink /proc/${PID}/ns/mnt and readlink /proc/1/ns/mnt are different Change-Id: I3856f9c8d160feb6fdff32e9abdbbfda0947d3f5 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform2/+/2147356 Tested-by: Betul Soysal <betuls@google.com> Commit-Queue: Betul Soysal <betuls@google.com> Reviewed-by: Mike Frysinger <vapier@chromium.org> Reviewed-by: Jorge Lucangeli Obes <jorgelo@chromium.org> Auto-Submit: Betul Soysal <betuls@google.com> Cr-Mirrored-From: https://chromium.googlesource.com/chromiumos/platform2 Cr-Mirrored-Commit: 2ba7a03d1bf739e3884a22ed300aa2c8a1aadc25
libbrillo is a shared library meant to hold common utility code that we deem useful for platform projects. It supplements the functionality provided by libbase/libchrome since that project, by design, only holds functionality that Chromium (the browser) needs. As a result, this tends to be more OS-centric code.
This project is also used by Update Engine which is maintained in AOSP. However, AOSP doesn't use this codebase directly, it maintains its own libbrillo fork.
To help keep the projects in sync, we have a gsubtree set up on our GoB: https://chromium.googlesource.com/chromiumos/platform2/libbrillo/
This allows AOSP to cherry pick or merge changes directly back into their fork.