File: dynamic_user.patch

package info (click to toggle)
sispmctl 4.12-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,964 kB
  • sloc: sh: 4,602; ansic: 1,629; makefile: 77; xml: 28
file content (42 lines) | stat: -rw-r--r-- 1,251 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
From: Helmut Grohne <helmut@subdivi.de>
Subject: avoid the need for a sispmctl user by leveraging DynamicUser
Forwarded: no

--- sispmctl-4.11.orig/README.md
+++ sispmctl-4.11/README.md
@@ -88,9 +88,9 @@
 The web server can be started automatically with systemd. This requires the
 following steps:
 
-Create user sispmctl in group sispmctl. The command on Debian and Ubuntu is
+Create group sispmctl. The command on Debian and Ubuntu is
 
-    adduser sispmctl --system --group --disabled-login --no-create-home
+    addgroup sispmctl --system
 
 Provide the necessary authorizations via udev (see below).
 
@@ -114,8 +114,8 @@
 
     mkdir /etc/sispmctl
     base64 > /etc/sispmctl/password
-    chown sispmctl:sispmctl /etc/sispmctl/password
-    chmod 400 /etc/sispmctl/password
+    chown root:sispmctl /etc/sispmctl/password
+    chmod 640 /etc/sispmctl/password
 
 Or just use the bash script examples/passwordsetup.sh.
 
--- sispmctl-4.11.orig/examples/sispmctl.service
+++ sispmctl-4.11/examples/sispmctl.service
@@ -42,8 +42,8 @@
 SystemCallArchitectures=native
 UMask=177
 
-User=sispmctl
-Group=sispmctl
+DynamicUser=true
+SupplementaryGroups=sispmctl
 Type=forking
 ExecStart=/usr/local/bin/sispmctl -p 2638 -l
 SyslogIdentifier=sispmctl