diff options
author | Ralf Donau <ruelle@volleyballschlaeger.de> | 2021-07-20 23:22:34 +0200 |
---|---|---|
committer | Gunnar Beutner <gunnar@beutner.name> | 2021-07-21 10:47:22 +0200 |
commit | 6629af8bed0503532e0852b3a13f2a538d094e20 (patch) | |
tree | dd5f022d719b4475e6be9981b1b447fcc31e1929 /Userland/Applications/TextEditor | |
parent | a34a9e86986ca5a8b15ede1bdfe91b64aefee20b (diff) | |
download | serenity-6629af8bed0503532e0852b3a13f2a538d094e20.zip |
TextEditor: Tighten unveil
Only read access to the file_to_edit is required since
FileSystemAccessServer handles all other requests.
Diffstat (limited to 'Userland/Applications/TextEditor')
-rw-r--r-- | Userland/Applications/TextEditor/main.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Userland/Applications/TextEditor/main.cpp b/Userland/Applications/TextEditor/main.cpp index 9c4eef23e2..d9f38080af 100644 --- a/Userland/Applications/TextEditor/main.cpp +++ b/Userland/Applications/TextEditor/main.cpp @@ -37,8 +37,9 @@ int main(int argc, char** argv) FileArgument parsed_argument(file_to_edit); 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); - if (unveil(file_to_edit_full_path.characters(), "rwc") < 0) { + if (unveil(file_to_edit_full_path.characters(), "r") < 0) { perror("unveil"); return 1; } |