Merge pull request #5448 from crosbymichael/selinux-defaults
Add selinux label support for processes and mount
This commit is contained in:
commit
b6344f992e
6 changed files with 53 additions and 18 deletions
|
@ -75,8 +75,9 @@ func (ns *linuxNs) Init(container *libcontainer.Container, uncleanRootfs, consol
|
|||
}
|
||||
}
|
||||
runtime.LockOSThread()
|
||||
|
||||
if err := label.SetProcessLabel(container.Context["process_label"]); err != nil {
|
||||
return fmt.Errorf("SetProcessLabel label %s", err)
|
||||
return fmt.Errorf("set process label %s", err)
|
||||
}
|
||||
ns.logger.Printf("execing %s\n", args[0])
|
||||
return system.Execv(args[0], args[0:], container.Env)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue