Exemple #1
0
func NewGroup(sysGroup system.Group) *Group {
	groupname := sysGroup.Groupname()
	exists, _ := sysGroup.Exists()
	gid, _ := sysGroup.Gid()
	return &Group{
		Groupname: groupname,
		Exists:    exists.(bool),
		Gid:       gid.(string),
	}
}
Exemple #2
0
func NewGroup(sysGroup system.Group, ignoreList []string) *Group {
	groupname := sysGroup.Groupname()
	exists, _ := sysGroup.Exists()
	g := &Group{
		Groupname: groupname,
		Exists:    exists.(bool),
	}
	if !contains(ignoreList, "stderr") {
		gid, _ := sysGroup.Gid()
		g.Gid = gid.(string)
	}
	return g
}
Exemple #3
0
func NewGroup(sysGroup system.Group, config util.Config) (*Group, error) {
	groupname := sysGroup.Groupname()
	exists, _ := sysGroup.Exists()
	g := &Group{
		Groupname: groupname,
		Exists:    exists.(bool),
	}
	if !contains(config.IgnoreList, "stderr") {
		gid, _ := sysGroup.Gid()
		g.Gid = gid.(string)
	}
	return g, nil
}