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:43:59 +0200 |
commit | 32452d9f03e2cc5b98b4f5ddd419428c191b76fd (patch) | |
tree | 55e3c204f31910adad2e602cbc5e5c8edce4ab4c /src | |
parent | 9e8f85e24b971122f22f20e528e6d073db515634 (diff) | |
download | sssd-32452d9f03e2cc5b98b4f5ddd419428c191b76fd.tar.gz sssd-32452d9f03e2cc5b98b4f5ddd419428c191b76fd.tar.bz2 sssd-32452d9f03e2cc5b98b4f5ddd419428c191b76fd.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')
-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) { |