diff options
author | Andreas Kling <kling@serenityos.org> | 2020-01-21 18:45:18 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-01-21 18:45:18 +0100 |
commit | edf509c19e8b75e4773930c9a8d0f4dd2912197e (patch) | |
tree | 3932358f82c993a2c2614b726a3053a31573a640 /Applications/SystemMonitor | |
parent | 41716aebdea1489ee565ea342b9163c9053e5b09 (diff) | |
download | serenity-edf509c19e8b75e4773930c9a8d0f4dd2912197e.zip |
SystemMonitor: Use unveil()
Diffstat (limited to 'Applications/SystemMonitor')
-rw-r--r-- | Applications/SystemMonitor/main.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/Applications/SystemMonitor/main.cpp b/Applications/SystemMonitor/main.cpp index f715ce8b4b..b1679acad4 100644 --- a/Applications/SystemMonitor/main.cpp +++ b/Applications/SystemMonitor/main.cpp @@ -88,6 +88,23 @@ int main(int argc, char** argv) return 1; } + if (unveil("/etc/passwd", "r") < 0) { + perror("unveil"); + return 1; + } + + if (unveil("/res", "r") < 0) { + perror("unveil"); + return 1; + } + + if (unveil("/proc", "r") < 0) { + perror("unveil"); + return 1; + } + + unveil(nullptr, nullptr); + auto keeper = GWidget::construct(); keeper->set_layout(make<GBoxLayout>(Orientation::Vertical)); keeper->set_fill_with_background_color(true); |