From 242708de5b7a0aa530869c757a8a38b97f06a1ba Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Fri, 11 Aug 2017 15:07:36 +0200 Subject: [PATCH] su: improve some debug messages Signed-off-by: Karel Zak --- login-utils/su-common.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/login-utils/su-common.c b/login-utils/su-common.c index 863dd9c922..9a32a7dc7b 100644 --- a/login-utils/su-common.c +++ b/login-utils/su-common.c @@ -393,7 +393,7 @@ static void create_watching_parent(struct su_context *su) if (!caught_signal) { pid_t pid; - DBG(SIG, ul_debug("waiting for child")); + DBG(SIG, ul_debug("waiting for child [%d]...", child)); for (;;) { pid = waitpid(child, &status, WUNTRACED); @@ -579,7 +579,10 @@ static void run_shell( size_t argno = 1; int rc; - DBG(MISC, ul_debug("starting shell [shell=%s, command=%s]", shell, command)); + DBG(MISC, ul_debug("starting shell [shell=%s, command=\"%s\"%s%s]", + shell, command, + su->simulate_login ? " login" : "", + su->fast_startup ? " fast-start" : "")); if (su->simulate_login) { char *arg0; @@ -623,6 +626,8 @@ static bool is_restricted_shell(const char *shell) } } endusershell(); + + DBG(MISC, ul_debug("%s is restricted shell (not in /etc/shells)")); return true; } -- 2.47.2