Merge pull request #867 from rajasec/selinux-process

Removing the nil check for process label
This commit is contained in:
Mrunal Patel 2016-06-03 07:58:10 -07:00
commit 3211c9f721
1 changed files with 2 additions and 4 deletions

View File

@ -44,10 +44,8 @@ func (l *linuxSetnsInit) Init() error {
if err := apparmor.ApplyProfile(l.config.AppArmorProfile); err != nil {
return err
}
if l.config.ProcessLabel != "" {
if err := label.SetProcessLabel(l.config.ProcessLabel); err != nil {
return err
}
if err := label.SetProcessLabel(l.config.ProcessLabel); err != nil {
return err
}
return system.Execv(l.config.Args[0], l.config.Args[0:], os.Environ())
}