From 724f69c288cf33eedd8d8081aaa98b6dcd4607a1 Mon Sep 17 00:00:00 2001 From: Pavel 'LEdoian' Turinsky Date: Tue, 5 May 2020 00:44:04 +0200 Subject: [PATCH] Sudo should not change directory --- markdownrunner.py | 1 - 1 file changed, 1 deletion(-) diff --git a/markdownrunner.py b/markdownrunner.py index e14948a..1c39010 100755 --- a/markdownrunner.py +++ b/markdownrunner.py @@ -77,7 +77,6 @@ def parse_snippet(s: Tuple[str, str]) -> Sequence[Command]: parts = line.split(maxsplit=4) assert parts[3] == '-H', "Insecure sudo?" user = parts[2] - directory = f'~{user}' # This actually works with SSH. That is nice, since we don't need to know the target's /etc/passwd cmd = parts[4] elif line.startswith('sudo'): parts = line.split(maxsplit=1)