Module: kamailio
Branch: master
Commit: a3fd3b12ca9b1c3688255e9d645085947052bc6d
URL:
https://github.com/kamailio/kamailio/commit/a3fd3b12ca9b1c3688255e9d6450859…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2023-10-06T08:19:18+02:00
kamctl: check if kamctlrc is readable
- related to GH #3594
---
Modified: utils/kamctl/kamctl
---
Diff:
https://github.com/kamailio/kamailio/commit/a3fd3b12ca9b1c3688255e9d6450859…
Patch:
https://github.com/kamailio/kamailio/commit/a3fd3b12ca9b1c3688255e9d6450859…
---
diff --git a/utils/kamctl/kamctl b/utils/kamctl/kamctl
index dd09ffb7daf..ad4262b7fc0 100755
--- a/utils/kamctl/kamctl
+++ b/utils/kamctl/kamctl
@@ -39,13 +39,13 @@ if [ -n "$KAMCTLFULLPATH" ] ; then
fi
# check for rc file at standard locations
-if [ -f /etc/kamailio/kamctlrc ]; then
+if [ -f /etc/kamailio/kamctlrc -a -r /etc/kamailio/kamctlrc ]; then
. /etc/kamailio/kamctlrc
fi
-if [ -f /usr/local/etc/kamailio/kamctlrc ]; then
+if [ -f /usr/local/etc/kamailio/kamctlrc -a -r /usr/local/etc/kamailio/kamctlrc ]; then
. /usr/local/etc/kamailio/kamctlrc
fi
-if [ -f ~/.kamctlrc ]; then
+if [ -f ~/.kamctlrc -a -r ~/.kamctlrc ]; then
. ~/.kamctlrc
fi