From 82d0f92ab8b84466ae20ab919c1f9c3577b5cecb Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Mon, 22 May 2017 21:56:04 +0000 Subject: Initial commit --- bin/setuidgid | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100755 bin/setuidgid (limited to 'bin/setuidgid') diff --git a/bin/setuidgid b/bin/setuidgid new file mode 100755 index 0000000..be4e0a9 --- /dev/null +++ b/bin/setuidgid @@ -0,0 +1,7 @@ +#!/bin/sh -e + +test "$#" -ge 2 || { echo "setuidgid: too few arguments" 1>&2 ; exit 100 ; } + +wd=$(pwd) + +exec su -s /bin/sh -p -c "PATH=$PATH ; export PATH ; cd $wd ; exec \"\$0\" \"\$@\"" -- "$@" -- cgit v1.2.3