telnet: Activate principal naming.

This commit is contained in:
Mats Erik Andersson
2012-08-17 03:29:15 +02:00
parent 32746bf664
commit 4168cfe85d
3 changed files with 30 additions and 2 deletions

View File

@@ -173,7 +173,13 @@ krb5shishi_send (TN_Authenticator * ap)
DEBUG (("telnet: Kerberos V5: shishi memory allocation failed\r\n"));
return 0;
}
sprintf (tmp, "host/%s", RemoteHostName);
/* Check for Kerberos prefix in principal name. */
if (strchr (RemoteHostName, '/'))
strcpy (tmp, RemoteHostName);
else
sprintf (tmp, "host/%s", RemoteHostName);
memset (&hint, 0, sizeof (hint));
hint.server = tmp;
hint.client = UserNameRequested;