From b7302641533ea95671170be9f54754dbe70d3d4d Mon Sep 17 00:00:00 2001 From: Omar Sandoval Date: Mon, 11 Sep 2023 11:18:02 -0700 Subject: [PATCH] drgn.internal.sudohelper: include filename in sudo prompt It'll probably be helpful to users to know why drgn is asking for sudo permissions. Signed-off-by: Omar Sandoval --- drgn/internal/sudohelper.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drgn/internal/sudohelper.py b/drgn/internal/sudohelper.py index b0f6ec27b..0016bca5a 100644 --- a/drgn/internal/sudohelper.py +++ b/drgn/internal/sudohelper.py @@ -27,6 +27,8 @@ def open_via_sudo( subprocess.check_call( [ "sudo", + "-p", + f"[sudo] password for %p to open {path}: ", sys.executable, "-B", __file__,