diff options
author | Karel Zak | 2017-08-11 15:07:36 +0200 |
---|---|---|
committer | Karel Zak | 2017-09-18 11:48:56 +0200 |
commit | 242708de5b7a0aa530869c757a8a38b97f06a1ba (patch) | |
tree | e6be07c704778f7bb68b13ca46f7314869c3309a /login-utils/su-common.c | |
parent | su: add debug.h stuff (diff) | |
download | kernel-qcow2-util-linux-242708de5b7a0aa530869c757a8a38b97f06a1ba.tar.gz kernel-qcow2-util-linux-242708de5b7a0aa530869c757a8a38b97f06a1ba.tar.xz kernel-qcow2-util-linux-242708de5b7a0aa530869c757a8a38b97f06a1ba.zip |
su: improve some debug messages
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'login-utils/su-common.c')
-rw-r--r-- | login-utils/su-common.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/login-utils/su-common.c b/login-utils/su-common.c index 863dd9c92..9a32a7dc7 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; } |