mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 02:37:35 +00:00
TextEditor: Tighten unveil
Only read access to the file_to_edit is required since FileSystemAccessServer handles all other requests.
This commit is contained in:
parent
a34a9e8698
commit
6629af8bed
1 changed files with 2 additions and 1 deletions
|
@ -37,8 +37,9 @@ int main(int argc, char** argv)
|
||||||
FileArgument parsed_argument(file_to_edit);
|
FileArgument parsed_argument(file_to_edit);
|
||||||
|
|
||||||
file_to_edit_full_path = Core::File::real_path_for(parsed_argument.filename());
|
file_to_edit_full_path = Core::File::real_path_for(parsed_argument.filename());
|
||||||
|
VERIFY(!file_to_edit_full_path.is_empty());
|
||||||
dbgln("unveil for: {}", file_to_edit_full_path);
|
dbgln("unveil for: {}", file_to_edit_full_path);
|
||||||
if (unveil(file_to_edit_full_path.characters(), "rwc") < 0) {
|
if (unveil(file_to_edit_full_path.characters(), "r") < 0) {
|
||||||
perror("unveil");
|
perror("unveil");
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue