summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/nshd/hackers_git/db_config.go2
-rw-r--r--src/nshd/hackers_git/hackers.go11
-rw-r--r--src/nshd/hackers_git/hackers_watch.go4
-rw-r--r--src/nshd/main.go2
4 files changed, 10 insertions, 9 deletions
diff --git a/src/nshd/hackers_git/db_config.go b/src/nshd/hackers_git/db_config.go
index 1de0013..55faa18 100644
--- a/src/nshd/hackers_git/db_config.go
+++ b/src/nshd/hackers_git/db_config.go
@@ -19,7 +19,7 @@ func (o *Hackers) Config_Get(cred p.Ucred, req p.Request_Config_Get) p.Config_En
}
if val != nil {
- return util.New_Config_List([]p.Config{p.Config{Value:(*val)}})
+ return util.New_Config_List([]p.Config{p.Config{Value: *val}})
} else {
return util.Config_Ø{}
}
diff --git a/src/nshd/hackers_git/hackers.go b/src/nshd/hackers_git/hackers.go
index 2bc2fb2..83ef482 100644
--- a/src/nshd/hackers_git/hackers.go
+++ b/src/nshd/hackers_git/hackers.go
@@ -22,11 +22,12 @@ type Config struct {
type Hackers struct {
util.NullBackend
- cfg Config
- lock sync.RWMutex
- workers sync.WaitGroup
- users map[int32]user
- groups map[string]map[string]bool
+ cfg Config
+ lock sync.RWMutex
+ workers sync.WaitGroup
+
+ users map[int32]user
+ groups map[string]map[string]bool
in_fd *inotify.Inotify
in_wd_home inotify.Wd
diff --git a/src/nshd/hackers_git/hackers_watch.go b/src/nshd/hackers_git/hackers_watch.go
index 2e5eb75..f5029de 100644
--- a/src/nshd/hackers_git/hackers_watch.go
+++ b/src/nshd/hackers_git/hackers_watch.go
@@ -147,7 +147,7 @@ func (o *Hackers) worker_watch_homedirs() {
}
func worker_error(format string, a ...interface{}) {
- logger.Err("hackers.git: "+ format, a)
+ logger.Err("hackers.git: "+format, a)
os.Exit(int(lsb.EXIT_FAILURE))
}
@@ -171,7 +171,7 @@ func (o *Hackers) worker() {
worker_error("failed to load %q: %v", o.cfg.Yamldir, err)
}
} else if event.Mask&in_CHILD_ANY != 0 {
- if (event.Name == nil) {
+ if event.Name == nil {
panic("recieved child event from inotify, but no child name")
}
filename := o.cfg.Yamldir + "/" + *event.Name
diff --git a/src/nshd/main.go b/src/nshd/main.go
index 3560870..05236b8 100644
--- a/src/nshd/main.go
+++ b/src/nshd/main.go
@@ -1,10 +1,10 @@
package main
import (
- "sd_daemon/lsb"
"nshd/hackers_git"
"nslcd_systemd"
"os"
+ "sd_daemon/lsb"
)
func main() {