aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Eckert <fe@dev.tdt.de>2020-04-29 19:40:46 +0200
committerFlorian Eckert <Eckert.Florian@googlemail.com>2020-05-04 09:07:00 +0200
commit1b1ba710632f8f4850f02c22e83734a6c8b5c41a (patch)
tree12ed20cd8d8052a81b32bd05757167d74b77a34d
parentcc9e4d3b822378e7c787d107c4ce0c86e438099e (diff)
keepalived: add script security param to fix warning
Openwrt is a single user system. So keepalived is runnig as root. If we add the config options `script_user root` and `enabled_script_security' the following warnings are gone. > local1.info Keepalived_vrrp[5382]: SECURITY VIOLATION - scripts are being executed but script_security not enabled. Signed-off-by: Florian Eckert <fe@dev.tdt.de>
-rw-r--r--net/keepalived/files/keepalived.init3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/keepalived/files/keepalived.init b/net/keepalived/files/keepalived.init
index 05c47bb36..7af3f9c61 100644
--- a/net/keepalived/files/keepalived.init
+++ b/net/keepalived/files/keepalived.init
@@ -98,6 +98,9 @@ print_notify() {
globals() {
local notification_email
+ printf '%bscript_user root\n' "${INDENT_1}" >> "$KEEPALIVED_CONF"
+ printf '%benabled_script_security\n' "${INDENT_1}" >> "$KEEPALIVED_CONF"
+
config_get notification_email "$1" notification_email
print_list_indent notification_email