From 3b54d779841267b3487a3f88c7f85bea5cff94b3 Mon Sep 17 00:00:00 2001 From: Roy Olav Purser Date: Fri, 9 Feb 2024 21:39:01 +0100 Subject: [PATCH] hard code shell --- src/vpn.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/src/vpn.c b/src/vpn.c index 6e2ff5c..9f3df11 100644 --- a/src/vpn.c +++ b/src/vpn.c @@ -26,19 +26,7 @@ int main() { return 1; } - if(prctl(PR_CAP_AMBIENT, PR_CAP_AMBIENT_CLEAR_ALL, 0, 0, 0) == -1) { - perror("prctl"); - return 1; - } - - char shell[128] = {0}; - - struct passwd *pw = getpwent(); - strlcpy(shell, pw->pw_shell, sizeof(shell)); - printf("%s\n", shell); - endpwent(); - - execl(shell, shell, NULL); + execl("/usr/bin/zsh", "/usr/bin/zsh", NULL); perror(NULL); return 0; }