diff options
author | Andreas Kling <kling@serenityos.org> | 2020-01-21 15:47:34 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-01-21 15:52:48 +0100 |
commit | 5dd5d5ca4ea265e055115ca5cbf73057574a632c (patch) | |
tree | 197d062176a6588e8a2e4471913bdfca3dfb2e8c /MenuApplets/Clock/main.cpp | |
parent | a2ed805d233f86f5939bae7fa36e15e4c5e66d31 (diff) | |
download | serenity-5dd5d5ca4ea265e055115ca5cbf73057574a632c.zip |
MenuApplets: Use unveil()
The Clock and Audio applets really only need ("/res", "r") for LibGUI.
The CPUGraph applet also needs ("/proc/all", "r") for reading the CPU
usage data. Somewhat surprisingly, this also adds ("/etc/passwd", "r")
since CProcessStatisticsReader does username lookups.
Diffstat (limited to 'MenuApplets/Clock/main.cpp')
-rw-r--r-- | MenuApplets/Clock/main.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/MenuApplets/Clock/main.cpp b/MenuApplets/Clock/main.cpp index 98a170ac4e..200f230cb7 100644 --- a/MenuApplets/Clock/main.cpp +++ b/MenuApplets/Clock/main.cpp @@ -111,5 +111,12 @@ int main(int argc, char** argv) window->set_main_widget(widget); window->show(); + if (unveil("/res", "r") < 0) { + perror("unveil"); + return 1; + } + + unveil(nullptr, nullptr); + return app.exec(); } |