From 63b63b62437114b106577bc47a68ca7af593a444 Mon Sep 17 00:00:00 2001 From: Jacob Nevins Date: Sun, 17 Mar 2019 13:40:56 +0000 Subject: [PATCH] Set trust status appropriately for rlogin. Previously, all output in an rlogin session had spurious trust sigils. --- rlogin.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/rlogin.c b/rlogin.c index 1702f153..7a8a3baf 100644 --- a/rlogin.c +++ b/rlogin.c @@ -221,6 +221,8 @@ static const char *rlogin_init(Seat *seat, Backend **backend_handle, * anything else until the local prompt mechanism returns. */ if ((ruser = get_remote_username(conf)) != NULL) { + /* Next terminal output will come from server */ + seat_set_trust_status(rlogin->seat, false); rlogin_startup(rlogin, ruser); sfree(ruser); } else { @@ -233,6 +235,8 @@ static const char *rlogin_init(Seat *seat, Backend **backend_handle, add_prompt(rlogin->prompt, dupstr("rlogin username: "), true); ret = seat_get_userpass_input(rlogin->seat, rlogin->prompt, NULL); if (ret >= 0) { + /* Next terminal output will come from server */ + seat_set_trust_status(rlogin->seat, false); rlogin_startup(rlogin, rlogin->prompt->prompts[0]->result); } } @@ -280,6 +284,8 @@ static size_t rlogin_send(Backend *be, const char *buf, size_t len) */ int ret = seat_get_userpass_input(rlogin->seat, rlogin->prompt, &bc); if (ret >= 0) { + /* Next terminal output will come from server */ + seat_set_trust_status(rlogin->seat, false); rlogin_startup(rlogin, rlogin->prompt->prompts[0]->result); /* that nulls out rlogin->prompt, so then we'll start sending * data down the wire in the obvious way */