[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [torsocks/master] Ignore stderr for getcap command



commit 6228eabd72eda576403bf6f199881a6d39c1148e
Author: David Goulet <dgoulet@xxxxxxxxx>
Date:   Fri Feb 24 10:47:33 2017 -0500

    Ignore stderr for getcap command
    
    On a filesystem not supporting capabilities, an error is thrown out on
    stderr which is undesirable and confusing for the user.
    
    This commit throws stderr to /dev/null. The point of this getcap is to
    actually see if any capabilities are enabled or none. In the context of
    an error, there are none.
    
    Fixes #21088
    
    Signed-off-by: David Goulet <dgoulet@xxxxxxxxx>
---
 src/bin/torsocks.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/bin/torsocks.in b/src/bin/torsocks.in
index d8522e2..552a516 100644
--- a/src/bin/torsocks.in
+++ b/src/bin/torsocks.in
@@ -144,7 +144,7 @@ torify_app ()
 	# This must be before torifying because getcap uses cap_get_file(3)
 	# via syscall(2) which breaks torsocks.
 	if [ -n "$getcap" ]; then
-		caps=`$getcap $app_path`
+		caps=`$getcap $app_path 2>/dev/null`
 	fi
 
 	# Check if Apple's System Integrity Protection is enabled if the user is



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits