summaryrefslogtreecommitdiff
path: root/src/nshd/main.go
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2015-09-11 23:21:50 -0600
committerLuke Shumaker <lukeshu@sbcglobal.net>2015-09-11 23:21:50 -0600
commit5e781d7539ac8f1f17e6cfa04c3c28fdfe65f4db (patch)
tree67bb7e9f34221a9baa49f6e9d6ac71342cc7836e /src/nshd/main.go
parenteed575704b9277b71fb85846cb16dfa94549465c (diff)
Have nslcd_systemd manage the backend lifecycle
Diffstat (limited to 'src/nshd/main.go')
-rw-r--r--src/nshd/main.go14
1 files changed, 3 insertions, 11 deletions
diff --git a/src/nshd/main.go b/src/nshd/main.go
index 05236b8..775aca2 100644
--- a/src/nshd/main.go
+++ b/src/nshd/main.go
@@ -4,20 +4,12 @@ import (
"nshd/hackers_git"
"nslcd_systemd"
"os"
- "sd_daemon/lsb"
)
func main() {
- defer lsb.Recover()
- config := hackers_git.Config{
+ backend := &hackers_git.Hackers{Cfg: hackers_git.Config{
Pam_password_prohibit_message: "",
Yamldir: "/var/cache/parabola-hackers/users",
- }
- backend := hackers_git.NewHackers(config)
- if backend == nil {
- os.Exit(int(lsb.EXIT_FAILURE))
- }
- ret := nslcd_systemd.Main(backend)
- backend.Close()
- os.Exit(int(ret))
+ }}
+ os.Exit(int(nslcd_systemd.Main(backend)))
}