summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2015-09-03 13:50:10 -0600
committerLuke Shumaker <lukeshu@sbcglobal.net>2015-09-03 13:50:10 -0600
commit2d45bbd332bf439f483dacadf5e3e9776c97ef60 (patch)
treeb130508188532028652759cae08120d81297f386 /src
parent959055420845d7c63148fd5be8f9cf4285e2446b (diff)
tidy
Diffstat (limited to 'src')
-rw-r--r--src/nshd/hackers_git/hackers.go12
-rw-r--r--src/nshd/hackers_git/hackers_parse.go2
-rw-r--r--src/nshd/hackers_git/hackers_watch.go12
3 files changed, 13 insertions, 13 deletions
diff --git a/src/nshd/hackers_git/hackers.go b/src/nshd/hackers_git/hackers.go
index 4a1021a..b1fffc6 100644
--- a/src/nshd/hackers_git/hackers.go
+++ b/src/nshd/hackers_git/hackers.go
@@ -36,6 +36,18 @@ type Hackers struct {
var _ nslcd_systemd.Backend = &Hackers{}
var _ nslcd_proto.Backend = &Hackers{}
+func NewHackers(config Config) *Hackers {
+ o := Hackers{
+ cfg: config,
+ }
+ err := o.Reload()
+ if err != nil {
+ return nil
+ }
+ go o.worker()
+ return &o
+}
+
func (o *Hackers) Close() {
logger.Info("Closing hackers.git session")
o.lock.Lock()
diff --git a/src/nshd/hackers_git/hackers_parse.go b/src/nshd/hackers_git/hackers_parse.go
index b446ba1..47f10da 100644
--- a/src/nshd/hackers_git/hackers_parse.go
+++ b/src/nshd/hackers_git/hackers_parse.go
@@ -98,7 +98,7 @@ func load_user_yaml(filename string) (ret user, err error) {
}
}
if len(errs) > 0 {
- err = &yaml.TypeError{errs}
+ err = &yaml.TypeError{Errors: errs}
}
ret.passwd.PwHash = "!"
diff --git a/src/nshd/hackers_git/hackers_watch.go b/src/nshd/hackers_git/hackers_watch.go
index f902229..99e5eb3 100644
--- a/src/nshd/hackers_git/hackers_watch.go
+++ b/src/nshd/hackers_git/hackers_watch.go
@@ -43,18 +43,6 @@ func (o *Hackers) unwatchHomedir(wd inotify.Cint) {
delete(o.in_uid2wd, uid)
}
-func NewHackers(config Config) *Hackers {
- o := Hackers{
- cfg: config,
- }
- err := o.reload()
- if err != nil {
- return nil
- }
- go o.worker()
- return &o
-}
-
func (o *Hackers) close() {
if o.in_fd != nil {
o.in_fd.Close()