summaryrefslogtreecommitdiffstats
path: root/login-utils
diff options
context:
space:
mode:
authorKarel Zak2017-08-11 15:07:36 +0200
committerKarel Zak2017-09-18 11:48:56 +0200
commit242708de5b7a0aa530869c757a8a38b97f06a1ba (patch)
treee6be07c704778f7bb68b13ca46f7314869c3309a /login-utils
parentsu: add debug.h stuff (diff)
downloadkernel-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')
-rw-r--r--login-utils/su-common.c9
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;
}