ソースを参照

daemon: relabel secrets path

Signed-off-by: Antonio Murdaca <runcom@redhat.com>
Antonio Murdaca 8 年 前
コミット
b11af7b2f6
1 ファイル変更2 行追加0 行削除
  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
 	// remount secrets ro
 	if err := mount.Mount("tmpfs", localMountPath, "tmpfs", "remount,ro,"+tmpfsOwnership); err != nil {
 	if err := mount.Mount("tmpfs", localMountPath, "tmpfs", "remount,ro,"+tmpfsOwnership); err != nil {
 		return errors.Wrap(err, "unable to remount secret dir as readonly")
 		return errors.Wrap(err, "unable to remount secret dir as readonly")