[libcxx-commits] [PATCH] D97538: [libcxx] [test] Ifdef out tests that rely on perms::none on directories for triggering errors
Adrian McCarthy via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Mar 5 15:34:46 PST 2021
amccarth added a comment.
In D97538#2597729 <https://reviews.llvm.org/D97538#2597729>, @mstorsjo wrote:
> Tagging @curdeius and @amccarth for input and ideas
> If a process running as root can iterate over a directory even after chmod 000, I don't think changing the owner would help. Dunno about windows - on the API level we operate so far, permissions only consist of a boolean readonly flag, not much more. On some other level, windows filesystems have full ACLs for controlling access though.
I can't think of a way to trigger a permission denied error with anything less than an ACL. And it might be hard for the owner that just created the directory to then lock itself out. And if it succeeded, then the test might have trouble cleaning up afterwards.
I having a hard time even thinking of a Windows directory that would block permission to list contents. The best I can come up with is `C:\Users\SomebodyElse`, but that's not guaranteed to exist on any other machine, and you couldn't temporarily change the permissions to set up the rest of the scenario being tested.
I tried thinking of something other than an access problem that would temporarily interfere with iterating directory contents, but I'm not coming up with any good options.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D97538/new/
https://reviews.llvm.org/D97538
More information about the libcxx-commits
mailing list