Explorar o código

Merge pull request #34732 from vizv/fix-relabel-config-files

daemon: relabel config files.
Yong Tang %!s(int64=7) %!d(string=hai) anos
pai
achega
1bb55e6495
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

@@ -307,6 +307,8 @@ func (daemon *Daemon) setupConfigDir(c *container.Container) (setupErr error) {
 		if err := os.Chown(fPath, rootIDs.UID+uid, rootIDs.GID+gid); err != nil {
 			return errors.Wrap(err, "error setting ownership for config")
 		}
+
+		label.Relabel(fPath, c.MountLabel, false)
 	}
 
 	return nil