Merge pull request #627 from mrunalp/add_groups_check
Only try to get AdditionalGroups if they are configured.
This commit is contained in:
commit
5dc7ba0f24
|
@ -178,9 +178,12 @@ func setupUser(config *initConfig) error {
|
|||
return err
|
||||
}
|
||||
|
||||
addGroups, err := user.GetAdditionalGroupsPath(config.Config.AdditionalGroups, groupPath)
|
||||
if err != nil {
|
||||
return err
|
||||
var addGroups []int
|
||||
if len(config.Config.AdditionalGroups) > 0 {
|
||||
addGroups, err = user.GetAdditionalGroupsPath(config.Config.AdditionalGroups, groupPath)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
suppGroups := append(execUser.Sgids, addGroups...)
|
||||
|
|
Loading…
Reference in New Issue