diff options
author | Benjamin Franzke <benjaminfranzke@googlemail.com> | 2013-10-17 11:24:44 +0200 |
---|---|---|
committer | Benjamin Franzke <benjaminfranzke@googlemail.com> | 2013-10-17 13:25:59 +0200 |
commit | 2ee334a235a73c08941f65c5b8e3697757458010 (patch) | |
tree | ba41cce0387c256bae19414d0ce3d5085691e79c /src/krb5_plugin | |
parent | 82c8cd1732ebf89ec144e28b9ff26d8a2260a3e4 (diff) | |
download | sssd-2ee334a235a73c08941f65c5b8e3697757458010.tar.gz sssd-2ee334a235a73c08941f65c5b8e3697757458010.tar.bz2 sssd-2ee334a235a73c08941f65c5b8e3697757458010.zip |
krb5_locator: Allow socktype to be 0 (any)
man 3 getaddrinfo:
ai_socktype This field specifies the preferred socket type, for
example SOCK_STREAM or SOCK_DGRAM.
Specifying 0 in this field indicatesa that socket addresses of any
type can be returned by getaddrinfo().
Heimdal makes use of this and passes socktype = 0.
This makes the locator plugin usable with heimdal.
Diffstat (limited to 'src/krb5_plugin')
-rw-r--r-- | src/krb5_plugin/sssd_krb5_locator_plugin.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/krb5_plugin/sssd_krb5_locator_plugin.c b/src/krb5_plugin/sssd_krb5_locator_plugin.c index 725687dd..586c7dd1 100644 --- a/src/krb5_plugin/sssd_krb5_locator_plugin.c +++ b/src/krb5_plugin/sssd_krb5_locator_plugin.c @@ -340,6 +340,7 @@ krb5_error_code sssd_krb5_locator_lookup(void *private_data, switch (socktype) { case SOCK_STREAM: case SOCK_DGRAM: + case 0: /* any */ break; default: return KRB5_PLUGIN_NO_HANDLE; @@ -374,7 +375,7 @@ krb5_error_code sssd_krb5_locator_lookup(void *private_data, ai->ai_family, ai->ai_socktype)); if ((family == AF_UNSPEC || ai->ai_family == family) && - ai->ai_socktype == socktype) { + (ai->ai_socktype == socktype || socktype == 0)) { ret = cbfunc(cbdata, socktype, ai->ai_addr); if (ret != 0) { |