If krbhst fails to find an entry for `kpasswd_server', it will
fallback to `admin_server'. This will wind up returning address info with SOCK_STREAM type, which will cause the password change to mysteriously fail (since kpasswd is UDP only). Hack around the problem by explicitly requesting UDP when we fallback to `admin_server'. git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@11105 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -514,6 +514,8 @@ kpasswd_get_next(krb5_context context,
|
||||
struct krb5_krbhst_data *kd,
|
||||
krb5_krbhst_info **host)
|
||||
{
|
||||
krb5_error_code ret;
|
||||
|
||||
if((kd->flags & KD_CONFIG) == 0) {
|
||||
config_get_hosts(context, kd, "kpasswd_server");
|
||||
if(get_next(kd, host))
|
||||
@@ -538,7 +540,10 @@ kpasswd_get_next(krb5_context context,
|
||||
kd->flags = 0;
|
||||
kd->port = kd->def_port;
|
||||
kd->get_next = admin_get_next;
|
||||
return (*kd->get_next)(context, kd, host);
|
||||
ret = (*kd->get_next)(context, kd, host);
|
||||
if (ret == 0)
|
||||
(*host)->proto = KRB5_KRBHST_UDP;
|
||||
return ret;
|
||||
}
|
||||
|
||||
return KRB5_KDC_UNREACH; /* XXX */
|
||||
|
Reference in New Issue
Block a user