summaryrefslogtreecommitdiff
path: root/src/nshd/hackers_git/hackers_watch.go
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2015-09-07 23:58:08 -0600
committerLuke Shumaker <lukeshu@sbcglobal.net>2015-09-07 23:58:08 -0600
commitb09ba2f9f42c44402d0bd641789af9c04e6d4ee6 (patch)
treee10be24b4dd512996f20f36d82c74db782ef83b2 /src/nshd/hackers_git/hackers_watch.go
parentb6f1fcb4f2d3cfb1eea95e9e0c6ae11f0659ba3a (diff)
clean up
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 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)