diff options
author | Martin Pärtel <martin.partel@gmail.com> | 2012-03-26 19:27:18 +0300 |
---|---|---|
committer | Martin Pärtel <martin.partel@gmail.com> | 2012-03-26 19:27:18 +0300 |
commit | 9bcae813af89d445a4d269e83c371847075f1008 (patch) | |
tree | 4b54d7d3c56ce93910635e2d306a84a7b322b1ba /tests/test_bindfs.rb | |
parent | 6d96d673fa3977364a9cb3c8c9d3c82ced521bb6 (diff) | |
download | bindfs-9bcae813af89d445a4d269e83c371847075f1008.tar.gz |
Made --map affect chown/chgrp results.
Diffstat (limited to 'tests/test_bindfs.rb')
-rwxr-xr-x | tests/test_bindfs.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/test_bindfs.rb b/tests/test_bindfs.rb index 30899ed..ef732ff 100755 --- a/tests/test_bindfs.rb +++ b/tests/test_bindfs.rb @@ -293,3 +293,17 @@ root_testenv("-u 1 --map=1/2:3/4") do assert { File.stat('mnt/file1').uid == 1 } assert { File.stat('mnt/file2').uid == 1 } end + +root_testenv("--map=0/1:@0/@1", :title => "--map and chown/chgrp") do + touch('src/file1') + chown(2, 2, 'src/file1') + assert { File.stat('mnt/file1').uid == 2 } + assert { File.stat('mnt/file1').gid == 2 } + + chown(1, 1, 'mnt/file1') + + assert { File.stat('src/file1').uid == 0 } + assert { File.stat('src/file1').gid == 0 } + assert { File.stat('mnt/file1').uid == 1 } + assert { File.stat('mnt/file1').gid == 1 } +end |