diff options
Diffstat (limited to 'crypto/openssh/session.c')
-rw-r--r-- | crypto/openssh/session.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/crypto/openssh/session.c b/crypto/openssh/session.c index af2e719..55db2ff 100644 --- a/crypto/openssh/session.c +++ b/crypto/openssh/session.c @@ -201,6 +201,7 @@ display_loginmsg(void) printf("%s\n", (char *)buffer_ptr(&loginmsg)); buffer_clear(&loginmsg); } + fflush(stdout); } void @@ -492,6 +493,13 @@ do_exec_no_pty(Session *s, const char *command) close(err[0]); /* + * Clear loginmsg, since it's the child's responsibility to display + * it to the user, otherwise multiple sessions may accumulate + * multiple copies of the login messages. + */ + buffer_clear(&loginmsg); + + /* * Enter the interactive session. Note: server_loop must be able to * handle the case that fdin and fdout are the same. */ @@ -1085,9 +1093,9 @@ do_setup_env(Session *s, const char *shell) } #endif #ifdef KRB5 - if (s->authctxt->krb5_ticket_file) + if (s->authctxt->krb5_ccname) child_set_env(&env, &envsize, "KRB5CCNAME", - s->authctxt->krb5_ticket_file); + s->authctxt->krb5_ccname); #endif #ifdef USE_PAM /* |