Add support for umask when exec container

Signed-off-by: WangXiaoSong <wang.xiaosong1@zte.com.cn>
This commit is contained in:
Wang-squirrel
2022-11-11 17:25:22 +08:00
committed by WangXiaoSong
parent 5a0642d6fd
commit 7b4c3fc111
2 changed files with 9 additions and 0 deletions
+4
View File
@@ -59,6 +59,10 @@ func (l *linuxSetnsInit) Init() error {
return err
}
}
if l.config.Config.Umask != nil {
unix.Umask(int(*l.config.Config.Umask))
}
if err := selinux.SetExecLabel(l.config.ProcessLabel); err != nil {
return err
}