summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormicmac12021-01-25 21:28:59 +0000
committerGitHub2021-01-25 21:28:59 +0000
commitda8e8774506313ee665a1681c257d6c25271a042 (patch)
treeed14c2f8ebd16e7735fe8057a6c91446a5010eb9
parent4d2bb84647575641eb55fc82e62b341b7aa056d6 (diff)
parent442a19214be18f624209fb6e6de5897e6d2d4584 (diff)
downloadtelephony-da8e8774506313ee665a1681c257d6c25271a042.tar.gz
Merge pull request #608 from guidosarducci/master-fix-uid-error
siproxd: fix UID variable conflict in init
-rw-r--r--net/siproxd/Makefile2
-rw-r--r--net/siproxd/files/siproxd.init10
2 files changed, 6 insertions, 6 deletions
diff --git a/net/siproxd/Makefile b/net/siproxd/Makefile
index 6fc8af4..8f36a23 100644
--- a/net/siproxd/Makefile
+++ b/net/siproxd/Makefile
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=siproxd
PKG_VERSION:=0.8.3
-PKG_RELEASE:=3
+PKG_RELEASE:=4
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=@SF/siproxd
diff --git a/net/siproxd/files/siproxd.init b/net/siproxd/files/siproxd.init
index a8b86f7..dd932bd 100644
--- a/net/siproxd/files/siproxd.init
+++ b/net/siproxd/files/siproxd.init
@@ -11,8 +11,8 @@ CONF_DIR="/var/etc/siproxd"
REG_DIR="/var/lib/siproxd"
PID_DIR="/var/run/siproxd"
PLUGIN_DIR="/usr/lib/siproxd/"
-UID="nobody"
-GID="nogroup"
+SIPROXD_UID="nobody"
+SIPROXD_GID="nogroup"
# Some options need special handling or conflict with procd/jail setup.
append CONF_SKIP "interface_inbound interface_outbound chrootjail"
@@ -74,7 +74,7 @@ apply_defaults() {
default_conf tcp_keepalive 20
default_conf default_expires 600
default_conf daemonize 0
- default_conf user "$UID"
+ default_conf user "$SIPROXD_UID"
default_conf registration_file "$REG_DIR/siproxd-$sec.reg"
default_conf plugindir "$PLUGIN_DIR"
}
@@ -116,7 +116,7 @@ section_end() {
[ -d "$plugin_dir" ] && procd_add_jail_mount "$plugin_dir"
# Ensure registration file exists for jail
[ -f "$reg_file" ] || touch "$reg_file"
- chown "$UID:$GID" "$reg_file"
+ chown "$SIPROXD_UID:$SIPROXD_GID" "$reg_file"
procd_add_jail_mount_rw "$reg_file"
procd_close_instance
}
@@ -163,7 +163,7 @@ service_triggers()
start_service() {
mkdir -p "$CONF_DIR" "$REG_DIR" "$PID_DIR"
chmod 755 "$CONF_DIR" "$REG_DIR" "$PID_DIR"
- chown "$UID:$GID" "$REG_DIR"
+ chown "$SIPROXD_UID:$SIPROXD_GID" "$REG_DIR"
siproxd_cb
config_load 'siproxd'