You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
daemon: move getUnprivilegedMountFlags to internal package
This code is currently only used in the daemon, but is also needed in other
places. We should consider moving this code to github.com/moby/sys, so that
BuildKit can also use the same implementation instead of maintaining a fork;
moving it to internal allows us to reuse this code inside the repository, but
does not allow external consumers to depend on it (which we don't want as
it's not a permanent location).
As our code only uses this in linux files, I did not add a stub for other
platforms (but we may decide to do that in the moby/sys repository).
Signed-off-by: Sebastiaan van Stijn <[email protected]>
(cherry picked from commit 7b414f5)
Signed-off-by: Paweł Gronowski <[email protected]>
// UnprivilegedMountFlags gets the set of mount flags that are set on the mount that contains the given
8
+
// path and are locked by CL_UNPRIVILEGED. This is necessary to ensure that
9
+
// bind-mounting "with options" will not fail with user namespaces, due to
10
+
// kernel restrictions that require user namespace mounts to preserve
11
+
// CL_UNPRIVILEGED locked flags.
12
+
//
13
+
// TODO: Move to github.com/moby/sys/mount, and update BuildKit copy of this code as well (https://github.com/moby/buildkit/blob/v0.13.0/util/rootless/mountopts/mountopts_linux.go#L11-L18)
0 commit comments