From c0ee0bdc464e704646526d4c0e98862b9ecb86bd Mon Sep 17 00:00:00 2001 From: Brian Gianforcaro Date: Sat, 22 Feb 2020 12:17:39 -0800 Subject: [PATCH] TTYServer: Use unveil() --- Servers/TTYServer/main.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Servers/TTYServer/main.cpp b/Servers/TTYServer/main.cpp index bb3dfaffcc..79e43ca84b 100644 --- a/Servers/TTYServer/main.cpp +++ b/Servers/TTYServer/main.cpp @@ -38,6 +38,13 @@ int main(int argc, char** argv) return 1; } + if (unveil("/bin/Shell", "x") < 0) { + perror("unveil"); + return 1; + } + + unveil(nullptr, nullptr); + if (argc < 2) return -1;