Kernel: Add unveil('b')

This is a new "browse" permission that lets you open (and subsequently list
contents of) directories underneath the path, but not regular files or any other
types of files.
This commit is contained in:
Sergey Bugaev 2020-11-21 22:55:20 +03:00 committed by Andreas Kling
commit 098070b767
Notes: sideshowbarker 2024-07-19 01:17:40 +09:00
5 changed files with 30 additions and 6 deletions

View file

@ -644,6 +644,8 @@ static Optional<KBuffer> procfs$pid_unveil(InodeIdentifier identifier)
permissions_builder.append('x');
if (unveiled_path.permissions & UnveiledPath::Access::CreateOrRemove)
permissions_builder.append('c');
if (unveiled_path.permissions & UnveiledPath::Access::Browse)
permissions_builder.append('b');
obj.add("permissions", permissions_builder.to_string());
}
array.finish();