diff options
| author | Michael Biebl <biebl@debian.org> | 2026-02-22 00:40:03 +0100 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2026-02-22 00:40:03 +0100 |
| commit | ccdb9117cca7141ee709afca8b25c966ff4fa18e (patch) | |
| tree | 3b7377c95e1d4049c13dd9101ae923fee70ab91d /tools/test-sudo-wrapper.sh | |
| parent | d0ea10125cc04f55c1864451198d87fb801d1457 (diff) | |
| parent | 067fb576988f685e83ac8b0ae690334aff547c85 (diff) | |
Update upstream source from tag 'upstream/1.56.0'
Update to upstream version '1.56.0' with Debian dir 15fab61a7abf1fd4e2ba46785f96d935e87d32bb
Diffstat (limited to 'tools/test-sudo-wrapper.sh')
| -rwxr-xr-x | tools/test-sudo-wrapper.sh | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/tools/test-sudo-wrapper.sh b/tools/test-sudo-wrapper.sh index b375368e..a9019bc3 100755 --- a/tools/test-sudo-wrapper.sh +++ b/tools/test-sudo-wrapper.sh @@ -3,25 +3,13 @@ CMD="$1" shift; -# convert the libtool internal path -resolve_cmd() { - local C="$1" - - local C2="$(echo "$C" | sed 's#^\(.*/\)\.libs/lt-\([^/]\+\)$#\1\2#')" - if [[ "$C2" != "$C" && ! -x "$C2" ]]; then - # such a file does not exist... back to $C - C2="$C" - fi - echo "$C2" -} - if [[ $UID == 0 ]]; then # we are already root. Execute directly. - exec "$(resolve_cmd "$CMD")" "$@" + exec "$CMD" "$@" elif [[ "$NMTST_SUDO_NO_CALL_SELF" != "" ]]; then # when setting $NMTST_SUDO_NO_CALL_SELF, pass the (resolved) command # directly to sudo. - exec sudo "$(resolve_cmd "$CMD")" "$@" + exec sudo "$CMD" "$@" else # by default, call self again with sudo. exec sudo -E "$0" "$CMD" "$@" |