summaryrefslogtreecommitdiff
path: root/src/nshd/hackers_git/hackers_watch.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/nshd/hackers_git/hackers_watch.go')
-rw-r--r--src/nshd/hackers_git/hackers_watch.go6
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 96e0480..2e5eb75 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)