-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't check that numeric UIDs and GIDs exist in user database.
A user database is not always available. For #79.
- Loading branch information
Showing
3 changed files
with
33 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#!/usr/bin/env ruby | ||
# | ||
# Copyright 2006,2007,2008,2009,2010,2012 Martin Pärtel <[email protected]> | ||
# Copyright 2006,2007,2008,2009,2010,2012,2019 Martin Pärtel <[email protected]> | ||
# | ||
# This file is part of bindfs. | ||
# | ||
|
@@ -66,6 +66,20 @@ def chown(user, group, list) | |
assert { File.stat('mnt/file').gid == nobody_gid } | ||
end | ||
|
||
testenv("-u #{nobody_uid} -g #{nobody_gid}", :title => "numeric UID and GID") do | ||
touch('src/file') | ||
|
||
assert { File.stat('mnt/file').uid == nobody_uid } | ||
assert { File.stat('mnt/file').gid == nobody_gid } | ||
end | ||
|
||
testenv("-u 55544 -g 55566", :title => "nonexistent UID and GID") do | ||
touch('src/file') | ||
|
||
assert { File.stat('mnt/file').uid == 55544 } | ||
assert { File.stat('mnt/file').gid == 55566 } | ||
end | ||
|
||
testenv("-p 0600:u+D") do | ||
touch('src/file') | ||
chmod(0777, 'src/file') | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters