diff options
author | Luke Shumaker <lukeshu@sbcglobal.net> | 2015-08-27 00:51:59 -0600 |
---|---|---|
committer | Luke Shumaker <lukeshu@sbcglobal.net> | 2015-08-27 00:51:59 -0600 |
commit | e2bebdb069b45bd8deb04536bd4772bfec3376b7 (patch) | |
tree | 33957bf367630541eedeb3ab37a0832b07efcaa5 /src/nshd/hackers_git/hackers.go | |
parent | f2482fcbf1bd7d521bb45192065e661971f227e6 (diff) |
wip
Diffstat (limited to 'src/nshd/hackers_git/hackers.go')
-rw-r--r-- | src/nshd/hackers_git/hackers.go | 40 |
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 +} |