1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
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 new storage driver: fuse-overlayfs 2020-02-10 23:48:52 +09:00
register new storage driver: fuse-overlayfs 2020-02-10 23:48:52 +09:00
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 daemon/graphdriver: normalize comment formatting 2019-11-27 15:43:23 +01:00
driver_freebsd.go
driver_linux.go Really switch to moby/sys/mount* 2020-03-20 09:46:25 -07:00
driver_test.go bump gotest.tools v3.0.1 for compatibility with Go 1.14 2020-02-11 00:06:42 +01:00
driver_unsupported.go
driver_windows.go
errors.go
fsdiff.go Add layer id to NaiveDiffDriver untar timing log 2018-10-05 16:28:40 -07:00
plugin.go goimports: fix imports 2019-09-18 12:56:54 +02:00
proxy.go Move plugin client creation to the extension point 2018-05-25 15:18:53 -04:00