From b6d2d8da1a502b86b8aef50dc885cdce27fdf595 Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Sat, 9 Mar 2013 18:00:50 +0100 Subject: Optimize to not spawn subshell in su-wrapper when running as same user. --- src/share/common | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/share/common b/src/share/common index 78fb04e..9329ce4 100755 --- a/src/share/common +++ b/src/share/common @@ -106,9 +106,9 @@ su_monkeysphere_user() { local CMDLINE="$(perl -0 -e "foreach (@ARGV) {s/'/'\\\\''/g; print \"'\$_' \"}" "$@")" case $(id -un) in - # if monkeysphere user, run the command under bash + # if monkeysphere user, simply execute in current shell "$MONKEYSPHERE_USER") - bash -c "$CMDLINE" + "$@" ;; # if root, su command as monkeysphere user -- cgit v1.2.3