moby--moby/daemon/graphdriver
Brian Goff 7f5e39bd4f
Use real root with 0701 perms
Various dirs in /var/lib/docker contain data that needs to be mounted
into a container. For this reason, these dirs are set to be owned by the
remapped root user, otherwise there can be permissions issues.
However, this uneccessarily exposes these dirs to an unprivileged user
on the host.

Instead, set the ownership of these dirs to the real root (or rather the
UID/GID of dockerd) with 0701 permissions, which allows the remapped
root to enter the directories but not read/write to them.
The remapped root needs to enter these dirs so the container's rootfs
can be configured... e.g. to mount /etc/resolve.conf.

This prevents an unprivileged user from having read/write access to
these dirs on the host.
The flip side of this is now any user can enter these directories.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
(cherry picked from commit e908cc3901)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-02-02 13:01:25 +01:00
..
aufs Use real root with 0701 perms 2021-02-02 13:01:25 +01:00
btrfs Use real root with 0701 perms 2021-02-02 13:01:25 +01:00
copy [DEL] remove useless assert 2020-11-09 23:38:45 +08:00
devmapper replace pkg/locker with github.com/moby/locker 2020-09-10 22:15:40 +02:00
fuse-overlayfs Use real root with 0701 perms 2021-02-02 13:01:25 +01:00
graphtest quota: move quota package out of graphdriver 2020-10-05 13:28:25 +00:00
lcow Parse storage-opt in GraphDriver init on Windows 2020-11-10 19:51:46 +11:00
overlay Use real root with 0701 perms 2021-02-02 13:01:25 +01:00
overlay2 Use real root with 0701 perms 2021-02-02 13:01:25 +01:00
overlayutils
register
vfs Use real root with 0701 perms 2021-02-02 13:01:25 +01:00
windows Parse storage-opt in GraphDriver init on Windows 2020-11-10 19:51:46 +11:00
zfs Use real root with 0701 perms 2021-02-02 13:01:25 +01:00
counter.go
driver.go
driver_freebsd.go
driver_linux.go
driver_test.go
driver_unsupported.go
driver_windows.go
errors.go
fsdiff.go
plugin.go
proxy.go