From 24a0dde01d3b64d36773e06eeb300d94992b2886 Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Fri, 8 Mar 2013 19:29:38 +0100 Subject: Pass only single commands through su wrapper It is a healthy coding practice to keep each argument separate when executing system calls, i.e. quote each variable separately instead of relying on whitespace to indicate argument separation. Quoting shell-inside-shell is tricky to do right, and gets trickier when more than a single command is wrapped together. This patch simplifies convoluted shell calls to contain only one command each. --- src/share/process_authorized_user_ids | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 src/share/process_authorized_user_ids (limited to 'src/share/process_authorized_user_ids') diff --git a/src/share/process_authorized_user_ids b/src/share/process_authorized_user_ids new file mode 100644 index 0000000..71ea0a6 --- /dev/null +++ b/src/share/process_authorized_user_ids @@ -0,0 +1,8 @@ +# -*-shell-script-*- +# This should be sourced by bash (though we welcome changes to make it POSIX sh compliant) + +STRICT_MODES="$1" +shift + +. "${SYSSHAREDIR}/common" +process_authorized_user_ids "$@" -- cgit v1.2.3