X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/blobdiff_plain/60860bc3697233687834d4efd4f1fe616f2fb9fb..881da16842e210236b12a040a19bf480de3a5a92:/rlogin.c diff --git a/rlogin.c b/rlogin.c index e40f1597..c9e7c5ec 100644 --- a/rlogin.c +++ b/rlogin.c @@ -197,6 +197,22 @@ static const char *rlogin_init(void *frontend_handle, void **backend_handle, rlogin->bufsize = sk_write(rlogin->s, &z, 1); } + if (*cfg->loghost) { + char *colon; + + sfree(*realhost); + *realhost = dupstr(cfg->loghost); + colon = strrchr(*realhost, ':'); + if (colon) { + /* + * FIXME: if we ever update this aspect of ssh.c for + * IPv6 literal management, this should change in line + * with it. + */ + *colon++ = '\0'; + } + } + return NULL; }