From 9e5d3aa28675155cf10d7fb26ad95a574607f16c Mon Sep 17 00:00:00 2001 From: William Wernert Date: Tue, 3 Aug 2021 15:25:53 -0400 Subject: [PATCH] Fix removed root check in so-rule --- salt/common/tools/sbin/so-rule | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/salt/common/tools/sbin/so-rule b/salt/common/tools/sbin/so-rule index bbb916807..bd1556f58 100755 --- a/salt/common/tools/sbin/so-rule +++ b/salt/common/tools/sbin/so-rule @@ -349,7 +349,9 @@ def sigint_handler(*_): def main(): signal.signal(signal.SIGINT, sigint_handler) - + if os.geteuid() != 0: + print('You must run this script as root', file=sys.stderr) + sys.exit(1) apply_help='After updating rule configuration, apply the idstools state.'