summaryrefslogtreecommitdiff
path: root/nshd.service.in
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2016-06-17 20:15:28 -0400
committerLuke Shumaker <lukeshu@sbcglobal.net>2016-06-17 20:15:28 -0400
commit902710f7956d29ae2c56d5851a4f4ecfb4de164d (patch)
treea48a8210244947a5658dd35106334cee37303dc2 /nshd.service.in
parenta4b34c37331a8b13066d684d259d7cb1aa5d7d1c (diff)
use setuid in the systemd service
Diffstat (limited to 'nshd.service.in')
-rw-r--r--nshd.service.in8
1 files changed, 5 insertions, 3 deletions
diff --git a/nshd.service.in b/nshd.service.in
index 19427d8..80b83a9 100644
--- a/nshd.service.in
+++ b/nshd.service.in
@@ -4,7 +4,9 @@ Requires=nshd.socket
[Service]
Type=notify
-ExecStart=@bindir@/nshd
+# Use our setuid program instead of setting User= because otherwise it
+# would deadlock as it tries to poll the nslcd socket to ask if it
+# knows who the user is. It would time out after 1 minute, but that's
+# still not good.
+ExecStart=@bindir@/setuid @user@ @bindir@/nshd
ExecReload=/bin/kill -HUP $MAINPID
-
-User=@user@