summaryrefslogtreecommitdiff
path: root/src/nshd/hackers_git/hackers.go
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2015-08-27 00:51:59 -0600
committerLuke Shumaker <lukeshu@sbcglobal.net>2015-08-27 00:51:59 -0600
commite2bebdb069b45bd8deb04536bd4772bfec3376b7 (patch)
tree33957bf367630541eedeb3ab37a0832b07efcaa5 /src/nshd/hackers_git/hackers.go
parentf2482fcbf1bd7d521bb45192065e661971f227e6 (diff)
wip
Diffstat (limited to 'src/nshd/hackers_git/hackers.go')
-rw-r--r--src/nshd/hackers_git/hackers.go40
1 files changed, 40 insertions, 0 deletions
diff --git a/src/nshd/hackers_git/hackers.go b/src/nshd/hackers_git/hackers.go
new file mode 100644
index 0000000..99af135
--- /dev/null
+++ b/src/nshd/hackers_git/hackers.go
@@ -0,0 +1,40 @@
+package hackers_git
+
+import (
+ _ "golang.org/x/exp/inotify"
+ _ "gopkg.in/yaml.v2"
+ p "nslcd_proto"
+ "nslcd_systemd"
+ "sync"
+)
+
+type Hackers struct {
+ p.NullBackend
+ lock *sync.RWMutex
+ pam_password_prohibit_message string
+}
+
+var _ nslcd_systemd.Backend = &Hackers{}
+var _ p.Backend = &Hackers{}
+
+func (o *Hackers) Reload() {
+ o.lock.Lock()
+ defer o.lock.Unlock()
+ // TODO
+}
+
+func NewHackers(yamlDir string) *Hackers {
+ // TODO
+ var hackers Hackers
+
+ var lock sync.RWMutex
+ hackers.lock = &lock
+
+ go inotify_watcher(yamlDir)
+
+ return &hackers
+}
+
+func inotify_watcher(yamlDir string) {
+ // TODO
+}