From e02c127f8e2c5001cf90429a2ee3532d7a4e3c76 Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Sat, 9 Feb 2013 19:54:08 +0100 Subject: Simplify arguments passed to su_monkeysphere_user() and gpg_sphere MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. This patch improves argument passing like this: a) Each argument is passed individually (not all as a single string) b) Arguments containing no variables are not quoted c) Dynamic arguments are double-quoted ( "$@" ) Due to su_monkeysphere_user() expanding arguments using "$*" (not "$@") arguments are mostly¹ coollapsed into single strings, and this change is therefore only cosmetic. It does improve clarity, however. Also, it eases switching to safer quoted arguments in the future. ¹As sole excepion ma/update_users line 82 has $STRICT_MODES dual-quoted. --- src/share/ma/update_users | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/share/ma/update_users') diff --git a/src/share/ma/update_users b/src/share/ma/update_users index 1330c8d..991c302 100644 --- a/src/share/ma/update_users +++ b/src/share/ma/update_users @@ -79,7 +79,7 @@ for uname in $unames ; do # process authorized_user_ids file, as monkeysphere user su_monkeysphere_user \ - ". ${SYSSHAREDIR}/process_authorized_user_ids '$STRICT_MODES' -" \ + . "${SYSSHAREDIR}/process_authorized_user_ids" "'$STRICT_MODES'" - \ < "$authorizedUserIDs" \ > "$tmpAuthorizedKeys" -- cgit v1.2.3