diff options
author | Luke Wilde <lukew@serenityos.org> | 2021-08-28 15:02:12 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-08-28 23:29:28 +0200 |
commit | 173ba4e19bf30c2fcdc2ee18b30de88c8444072f (patch) | |
tree | abccf8d597e22088650e7f276c9c27d4eeaebf9b /Userland/Applications/Mail | |
parent | d486560aeec97cdc68e8f283ce8c19555c36c81a (diff) | |
download | serenity-173ba4e19bf30c2fcdc2ee18b30de88c8444072f.zip |
Mail: Add unveil
Diffstat (limited to 'Userland/Applications/Mail')
-rw-r--r-- | Userland/Applications/Mail/main.cpp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/Userland/Applications/Mail/main.cpp b/Userland/Applications/Mail/main.cpp index c6f8f01e2e..ba7e2b48dd 100644 --- a/Userland/Applications/Mail/main.cpp +++ b/Userland/Applications/Mail/main.cpp @@ -25,6 +25,31 @@ int main(int argc, char** argv) Config::pledge_domains("Mail"); + if (unveil("/res", "r") < 0) { + perror("pledge"); + return 1; + } + + if (unveil("/etc", "r") < 0) { + perror("pledge"); + return 1; + } + + if (unveil("/tmp/portal/webcontent", "rw") < 0) { + perror("unveil"); + return 1; + } + + if (unveil("/tmp/portal/lookup", "rw") < 0) { + perror("unveil"); + return 1; + } + + if (unveil(nullptr, nullptr) < 0) { + perror("unveil"); + return 1; + } + auto window = GUI::Window::construct(); auto app_icon = GUI::Icon::default_icon("app-mail"); |