浏览代码

Merge pull request #38997 from thaJeztah/bump_selinux

bump opencontainers/selinux v1.2.1
Akihiro Suda 6 年之前
父节点
当前提交
dbe4a30928
共有 2 个文件被更改,包括 6 次插入1 次删除
  1. 1 1
      vendor.conf
  2. 5 0
      vendor/github.com/opencontainers/selinux/go-selinux/selinux_linux.go

+ 1 - 1
vendor.conf

@@ -161,4 +161,4 @@ github.com/morikuni/aec 39771216ff4c63d11f5e604076f9c45e8be1067b
 # metrics
 github.com/docker/go-metrics d466d4f6fd960e01820085bd7e1a24426ee7ef18
 
-github.com/opencontainers/selinux 9e2c5215628a2567782777efb2049f385484f918 # v1.2
+github.com/opencontainers/selinux 0bb7b9fa9ba5c1120e9d22caed4961fca4228408 # v1.2.1

+ 5 - 0
vendor/github.com/opencontainers/selinux/go-selinux/selinux_linux.go

@@ -333,6 +333,11 @@ func writeCon(fpath string, val string) error {
 	if fpath == "" {
 		return ErrEmptyPath
 	}
+	if val == "" {
+		if !GetEnabled() {
+			return nil
+		}
+	}
 
 	out, err := os.OpenFile(fpath, os.O_WRONLY, 0)
 	if err != nil {