From 79f1f5a884fe7c24785ef9e6a0fb206d873663b7 Mon Sep 17 00:00:00 2001 From: Daniil Baturin Date: Fri, 8 Sep 2017 04:41:48 +0200 Subject: Automatically wrap all script calls in generated templates into sudo sh -c shemminger once said we already overuse sudo and advocated using capabilities instead, but I think the union of all privilege sets needed equals the root privileges, and in practice admin level users need sudo anyway. --- scripts/build-command-templates | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts/build-command-templates') diff --git a/scripts/build-command-templates b/scripts/build-command-templates index 17442bfcb..3ed205c07 100755 --- a/scripts/build-command-templates +++ b/scripts/build-command-templates @@ -129,7 +129,7 @@ def make_node_def(props): node_def += "val_help: {0}; {1}\n".format(v[0], v[1]) if "owner" in props: - node_def += "end: {0}\n".format(props["owner"]) + node_def += "end: sudo sh -c \"{0}\"\n".format(props["owner"]) return node_def -- cgit v1.2.3