aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test_bindfs.rb
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_bindfs.rb')
-rwxr-xr-xtests/test_bindfs.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/test_bindfs.rb b/tests/test_bindfs.rb
index 69ca6e0..c5d41f6 100755
--- a/tests/test_bindfs.rb
+++ b/tests/test_bindfs.rb
@@ -763,7 +763,10 @@ testenv("", :title => "mntdir with newline", :mntdir_name => "a\nb") do
end
# Pull Request #73
-if `uname`.strip == 'Linux' && `which unshare` != ''
+if `uname`.strip == 'Linux' &&
+ `which unshare` != '' &&
+ `unshare --help`.include?("--map-root-user") &&
+ `unshare --help`.include?("--user")
root_testenv("--gid-offset=10000", :title => "setgid and gid-offset") do
system("chmod g+s src")
system("unshare --map-root-user --user #{$nobody} mkdir mnt/dir")