]> git.ipfire.org Git - thirdparty/krb5.git/commit
Allow numeric addresses as service hostnames
authorGreg Hudson <ghudson@mit.edu>
Tue, 9 Apr 2013 18:35:28 +0000 (14:35 -0400)
committerGreg Hudson <ghudson@mit.edu>
Tue, 9 Apr 2013 23:25:22 +0000 (19:25 -0400)
commit0f93db1b5bd0c2aac98945b8a8f1564ede632de0
tree98754bf282b0da6c22dd9cf8810adef1f4e04d9d
parent5f1050be2911d7dec46d73db8f517c0d1815e930
Allow numeric addresses as service hostnames

Since krb5 1.3, krb5_get_host_realm (and therefore
krb5_sname_to_principal) has refused hostnames which appear to be
numeric addresses--with the exception of 1.6, which was ignoring
errors from clean_hostname.  In specialized environments, it may be
desirable to use IP addresses in service principal names, and there's
no compelling reason for us to get in the way of that.

Move the numeric address check out of k5_clean_hostname into a new
helper function, and simply skip the domain-based mechanisms if it
returns true.  Factor out the [domain_realm] search into a second new
helper function to make it easier to skip.

ticket: 7603 (new)
src/lib/krb5/os/hst_realm.c