From 39931733a52ec72ad905a363225efb895775262f Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Tue, 21 Jan 2020 12:03:08 +0100 Subject: [PATCH] Calculator: Use unveil() A barebones GUI app like this only needs read access to /res (for fonts and themes, in case settings change) once it's up and running. --- Applications/Calculator/main.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Applications/Calculator/main.cpp b/Applications/Calculator/main.cpp index e52dff0254..e43f28a8df 100644 --- a/Applications/Calculator/main.cpp +++ b/Applications/Calculator/main.cpp @@ -47,6 +47,13 @@ int main(int argc, char** argv) return 1; } + if (unveil("/res", "r") < 0) { + perror("unveil"); + return 1; + } + + unveil(nullptr, nullptr); + auto window = GWindow::construct(); window->set_title("Calculator"); window->set_resizable(false);