Created attachment 1696 [details] Patch to allow a GSS_HOSTNAME environment variable to override gethostname() If you are on a host with multiple IP addresses that have different names, users cannot connect via GSSAPI authentication for the alternate hostnames. The attached patch will allow a GSS_HOSTNAME environment variable to be set which lets an sshd answer to a different hostname than the one that gethostname() returns. One can then run an sshd with this environment variable set and listening to an appropriate IP address to serve multiple hostnames on one system.
Comment on attachment 1696 [details] Patch to allow a GSS_HOSTNAME environment variable to override gethostname() I think this is addressed by bug #928 which is targeted (but not yet committed) for the next release. >+ if (0 != (p = getenv("GSS_HOSTNAME"))) { >+ strncpy(lname,p,MAXHOSTNAMELEN); If the environment variable is longer than MAXHOSTNAMELEN then lname will end up unterminated. You should use strlcpy instead.
I agree that the current proposed bug #928 fix would be a better solution. We should probably mark this as a dup of that bug. Sorry for missing it in my search.
Thanks, closing as duplicate. If you could test the patch in #928 and add the results to the bug that would help. *** This bug has been marked as a duplicate of bug 928 ***
Mass move of bugs RESOLVED->CLOSED following the release of openssh-5.5p1