From e2de537a287662adcbcdee68614240578dc38009 Mon Sep 17 00:00:00 2001 From: "K. Lange" Date: Wed, 1 Aug 2018 10:19:22 +0900 Subject: [PATCH] hack for sudo -s --- apps/sudo.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/apps/sudo.c b/apps/sudo.c index c0ad13bd..5d690281 100644 --- a/apps/sudo.c +++ b/apps/sudo.c @@ -72,6 +72,10 @@ int main(int argc, char ** argv) { continue; } + if (!strcmp(argv[1], "-s")) { + argv[1] = getenv("SHELL"); + } + char ** args = &argv[1]; execvp(args[0], args);