49 lines
1.4 KiB
Diff
49 lines
1.4 KiB
Diff
From 19a4209a82132f930fe55cbb2255eb453b465e56 Mon Sep 17 00:00:00 2001
|
|
From: zhongjiawei <zhongjiawei1@huawei.com>
|
|
Date: Thu, 11 Jul 2024 20:18:01 +0800
|
|
Subject: [PATCH] runc:do not support set umask through native.umask
|
|
|
|
Signed-off-by: zhongjiawei <zhongjiawei1@huawei.com>
|
|
---
|
|
libcontainer/rootfs_linux.go | 6 ------
|
|
libcontainer/setns_init_linux.go | 6 ------
|
|
2 files changed, 12 deletions(-)
|
|
|
|
diff --git a/libcontainer/rootfs_linux.go b/libcontainer/rootfs_linux.go
|
|
index c42e388..499d753 100644
|
|
--- a/libcontainer/rootfs_linux.go
|
|
+++ b/libcontainer/rootfs_linux.go
|
|
@@ -192,12 +192,6 @@ func finalizeRootfs(config *configs.Config) (err error) {
|
|
} else {
|
|
unix.Umask(0o022)
|
|
}
|
|
- umask := utils.SearchLabels(config.Labels, "native.umask")
|
|
- if umask == "normal" {
|
|
- unix.Umask(0o022)
|
|
- } else {
|
|
- unix.Umask(0o027)
|
|
- }
|
|
return nil
|
|
}
|
|
|
|
diff --git a/libcontainer/setns_init_linux.go b/libcontainer/setns_init_linux.go
|
|
index f1dcab6..d8cdfdf 100644
|
|
--- a/libcontainer/setns_init_linux.go
|
|
+++ b/libcontainer/setns_init_linux.go
|
|
@@ -56,12 +56,6 @@ func (l *linuxSetnsInit) Init() error {
|
|
return err
|
|
}
|
|
}
|
|
- umask := utils.SearchLabels(l.config.Config.Labels, "native.umask")
|
|
- if umask == "normal" {
|
|
- unix.Umask(0o022)
|
|
- } else {
|
|
- unix.Umask(0o027)
|
|
- }
|
|
if l.config.NoNewPrivileges {
|
|
if err := unix.Prctl(unix.PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0); err != nil {
|
|
return err
|
|
--
|
|
2.33.0
|
|
|