[torsocks/master] Fix error messages about setuid/setgid executables

commit 0dcfe377c749860502359d5eb62a15550d317f66 Author: Dmitry Shachnev <mitya57@gmail.com> Date: Thu Dec 4 15:42:43 2014 +0300 Fix error messages about setuid/setgid executables Signed-off-by: David Goulet <dgoulet@ev0ke.net> --- src/bin/torsocks.in | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/bin/torsocks.in b/src/bin/torsocks.in index a392d0b..7fd43d6 100644 --- a/src/bin/torsocks.in +++ b/src/bin/torsocks.in @@ -105,8 +105,11 @@ torify_app () elif [ -z $app_path ]; then echo "ERROR: $1 cannot be found." >&2 exit 1 - elif [ -u $app_path -o -g $app_path ]; then - echo "ERROR: $1 is set${2}id. torsocks will not work on a set${2}id executable." >&2 + elif [ -u $app_path ]; then + echo "ERROR: $1 is setuid. torsocks will not work on a setuid executable." >&2 + exit 1 + elif [ -g $app_path ]; then + echo "ERROR: $1 is setgid. torsocks will not work on a setgid executable." >&2 exit 1 fi
participants (1)
-
dgoulet@torproject.org