summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/nshd/hackers_git/hackers_parse.go2
-rw-r--r--src/nshd/main.go3
2 files changed, 4 insertions, 1 deletions
diff --git a/src/nshd/hackers_git/hackers_parse.go b/src/nshd/hackers_git/hackers_parse.go
index f1f360f..a9a03f3 100644
--- a/src/nshd/hackers_git/hackers_parse.go
+++ b/src/nshd/hackers_git/hackers_parse.go
@@ -77,7 +77,7 @@ func load_user_yaml(filename string) (ret user, err error) {
}
if iface, isSet := data["groups"]; !isSet {
- errs = append(errs, "\"groups\" is not set")
+ ret.groups = make([]string, 0)
} else if ary, isTyp := iface.([]interface{}); !isTyp {
errs = append(errs, "\"groups\" is not an array")
} else {
diff --git a/src/nshd/main.go b/src/nshd/main.go
index bc53711..3560870 100644
--- a/src/nshd/main.go
+++ b/src/nshd/main.go
@@ -14,6 +14,9 @@ func main() {
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))