Explorar o código

daemon: relabel secrets path

Signed-off-by: Antonio Murdaca <runcom@redhat.com>
(cherry picked from commit b11af7b2f686fe3724d0cfce260000a3d2b8fbc1)
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Antonio Murdaca %!s(int64=8) %!d(string=hai) anos
pai
achega
39372e619c
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  1. 2 0
      daemon/container_operations_unix.go

+ 2 - 0
daemon/container_operations_unix.go

@@ -213,6 +213,8 @@ func (daemon *Daemon) setupSecretDir(c *container.Container) (setupErr error) {
 		}
 	}
 
+	label.Relabel(localMountPath, c.MountLabel, false)
+
 	// remount secrets ro
 	if err := mount.Mount("tmpfs", localMountPath, "tmpfs", "remount,ro,"+tmpfsOwnership); err != nil {
 		return errors.Wrap(err, "unable to remount secret dir as readonly")