Skip to content

Commit

Permalink
pkg: add CAP_CHOWN capability to Kamailio systemd service files to al…
Browse files Browse the repository at this point in the history
…low chown (#2391)

- add CAP_CHOWN capability to Kamailio systemd service files to allow chown
- needed e.g. for user and group setting from jsonrpcs and ctl modules
- related to github issue #2391

(cherry picked from commit 8b72f46)
  • Loading branch information
henningw committed Oct 30, 2020
1 parent 5a44ad2 commit 2a3b8d4
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/kamailio/deb/bionic/kamailio.service
Expand Up @@ -20,6 +20,8 @@ Restart=on-failure
# /run/kamailio in tmpfs
RuntimeDirectory=kamailio
RuntimeDirectoryMode=0770
# necessary for chown of control files e.g. for jsonrpcs and ctl modules
AmbientCapabilities=CAP_CHOWN

[Install]
WantedBy=multi-user.target
2 changes: 2 additions & 0 deletions pkg/kamailio/deb/buster/kamailio.service
Expand Up @@ -20,6 +20,8 @@ Restart=on-failure
# /run/kamailio in tmpfs
RuntimeDirectory=kamailio
RuntimeDirectoryMode=0770
# necessary for chown of control files e.g. for jsonrpcs and ctl modules
AmbientCapabilities=CAP_CHOWN

[Install]
WantedBy=multi-user.target
2 changes: 2 additions & 0 deletions pkg/kamailio/deb/debian/kamailio.service
Expand Up @@ -20,6 +20,8 @@ Restart=on-failure
# /run/kamailio in tmpfs
RuntimeDirectory=kamailio
RuntimeDirectoryMode=0770
# necessary for chown of control files e.g. for jsonrpcs and ctl modules
AmbientCapabilities=CAP_CHOWN

[Install]
WantedBy=multi-user.target
2 changes: 2 additions & 0 deletions pkg/kamailio/deb/jessie/kamailio.service
Expand Up @@ -20,6 +20,8 @@ Restart=on-failure
# /run/kamailio in tmpfs
RuntimeDirectory=kamailio
RuntimeDirectoryMode=0770
# necessary for chown of control files e.g. for jsonrpcs and ctl modules
AmbientCapabilities=CAP_CHOWN

[Install]
WantedBy=multi-user.target
2 changes: 2 additions & 0 deletions pkg/kamailio/deb/sid/kamailio.service
Expand Up @@ -20,6 +20,8 @@ Restart=on-failure
# /run/kamailio in tmpfs
RuntimeDirectory=kamailio
RuntimeDirectoryMode=0770
# necessary for chown of control files e.g. for jsonrpcs and ctl modules
AmbientCapabilities=CAP_CHOWN

[Install]
WantedBy=multi-user.target
2 changes: 2 additions & 0 deletions pkg/kamailio/deb/stretch/kamailio.service
Expand Up @@ -20,6 +20,8 @@ Restart=on-failure
# /run/kamailio in tmpfs
RuntimeDirectory=kamailio
RuntimeDirectoryMode=0770
# necessary for chown of control files e.g. for jsonrpcs and ctl modules
AmbientCapabilities=CAP_CHOWN

[Install]
WantedBy=multi-user.target
2 changes: 2 additions & 0 deletions pkg/kamailio/deb/xenial/kamailio.service
Expand Up @@ -20,6 +20,8 @@ Restart=on-failure
# /run/kamailio in tmpfs
RuntimeDirectory=kamailio
RuntimeDirectoryMode=0770
# necessary for chown of control files e.g. for jsonrpcs and ctl modules
AmbientCapabilities=CAP_CHOWN

[Install]
WantedBy=multi-user.target
2 changes: 2 additions & 0 deletions pkg/kamailio/obs/kamailio.service
Expand Up @@ -13,6 +13,8 @@ Environment='PKG_MEMORY=4'
EnvironmentFile=-/etc/sysconfig/kamailio
ExecStart=/usr/sbin/kamailio -DD -P /var/run/kamailio/kamailio.pid -f $CFGFILE -m $SHM_MEMORY -M $PKG_MEMORY
Restart=on-failure
# necessary for chown of control files e.g. for jsonrpcs and ctl modules
AmbientCapabilities=CAP_CHOWN

[Install]
WantedBy=multi-user.target

0 comments on commit 2a3b8d4

Please sign in to comment.