summaryrefslogtreecommitdiffstats
path: root/src/sysv/systemd
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2016-08-15 14:10:23 +0200
committerJakub Hrozek <jhrozek@redhat.com>2016-08-17 16:55:31 +0200
commit733100a12138a701d0ae7ef5af2b04b08e225033 (patch)
tree8896aa011f94245c0a3b86a13d2cb7266909f9de /src/sysv/systemd
parent942b4ce6e60e88e4e31600655fad8980f3986f68 (diff)
downloadsssd-733100a12138a701d0ae7ef5af2b04b08e225033.tar.gz
sssd-733100a12138a701d0ae7ef5af2b04b08e225033.tar.xz
sssd-733100a12138a701d0ae7ef5af2b04b08e225033.zip
BUILD: Ship systemd service file for sssd-secrets
Adds two new files: sssd-secrets.socket and sssd-secrets.service. These can be used to socket-acticate the secrets responder even without explicitly starting it in the sssd config file. The specfile activates the socket after installation which means that the admin would just be able to use the secrets socket and the sssd_secrets responder would be started automatically by systemd. The sssd-secrets responder is started as root, mostly because I didn't think of an easy way to pass the uid/gid to the responders without asking about the sssd user identity in the first place. But nonetheless, the sssd-secrets responder wasn't tested as non-root and at least the initialization should be performed as root for the time being. Reviewed-by: Fabiano Fidêncio <fabiano@fidencio.org> Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com>
Diffstat (limited to 'src/sysv/systemd')
-rw-r--r--src/sysv/systemd/sssd-secrets.service.in8
-rw-r--r--src/sysv/systemd/sssd-secrets.socket.in8
2 files changed, 16 insertions, 0 deletions
diff --git a/src/sysv/systemd/sssd-secrets.service.in b/src/sysv/systemd/sssd-secrets.service.in
new file mode 100644
index 000000000..119c9bb4b
--- /dev/null
+++ b/src/sysv/systemd/sssd-secrets.service.in
@@ -0,0 +1,8 @@
+[Unit]
+Description=SSSD Secrets Service responder
+
+[Install]
+Also=sssd-secrets.socket
+
+[Service]
+ExecStart=@libexecdir@/sssd/sssd_secrets --uid 0 --gid 0 --debug-to-files
diff --git a/src/sysv/systemd/sssd-secrets.socket.in b/src/sysv/systemd/sssd-secrets.socket.in
new file mode 100644
index 000000000..682e8f6e0
--- /dev/null
+++ b/src/sysv/systemd/sssd-secrets.socket.in
@@ -0,0 +1,8 @@
+[Unit]
+Description=SSSD Secrets Service responder socket
+
+[Socket]
+ListenStream=@localstatedir@/run/secrets.socket
+
+[Install]
+WantedBy=sockets.target