Sfoglia il codice sorgente

Merge pull request #32529 from runcom/relabel-secrets

daemon: relabel secrets path
Evan Hazlett 8 anni fa
parent
commit
2aec48f448
1 ha cambiato i file con 2 aggiunte e 0 eliminazioni
  1. 2 0
      daemon/container_operations_unix.go

+ 2 - 0
daemon/container_operations_unix.go

@@ -214,6 +214,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")