1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-18 14:55:08 +00:00

SystemMonitor: Use unveil()

This commit is contained in:
Andreas Kling 2020-01-21 18:45:18 +01:00
parent 41716aebde
commit edf509c19e

View file

@ -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);