diff options
Diffstat (limited to 'src/nshd/hackers_git/hackers_watch.go')
-rw-r--r-- | src/nshd/hackers_git/hackers_watch.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nshd/hackers_git/hackers_watch.go b/src/nshd/hackers_git/hackers_watch.go index f5029de..8e3834e 100644 --- a/src/nshd/hackers_git/hackers_watch.go +++ b/src/nshd/hackers_git/hackers_watch.go @@ -106,11 +106,11 @@ func (o *Hackers) load_yaml_file(filename string) { o.lock.Lock() defer o.lock.Unlock() if olduser, found := o.users[uid]; found { - for groupname, _ := range olduser.groups { + for _, groupname := range olduser.groups { o.del_user_from_group(olduser.passwd.Name, groupname) } } - for groupname, _ := range user.groups { + for _, groupname := range user.groups { o.add_user_to_group(user.passwd.Name, groupname) } o.users[uid] = user @@ -124,7 +124,7 @@ func (o *Hackers) load_yaml_file(filename string) { o.unwatchHomedir(wd) } if olduser, found := o.users[uid]; found { - for groupname, _ := range olduser.groups { + for _, groupname := range olduser.groups { o.del_user_from_group(olduser.passwd.Name, groupname) } delete(o.users, uid) |