diff options
author | Stephen Gallagher <sgallagh@redhat.com> | 2012-05-25 10:09:20 -0400 |
---|---|---|
committer | Stephen Gallagher <sgallagh@redhat.com> | 2012-05-25 13:30:52 -0400 |
commit | 8126906ab783494204dc853c814b0882d2a76523 (patch) | |
tree | d8fd922202f0db1e976a3e1f214c03b29bae5aca /src/sss_client | |
parent | 188f9e1e646b0bed530913ca76bbcdf0f342cc66 (diff) | |
download | sssd-8126906ab783494204dc853c814b0882d2a76523.tar.gz sssd-8126906ab783494204dc853c814b0882d2a76523.tar.xz sssd-8126906ab783494204dc853c814b0882d2a76523.zip |
NSS: Restore original protocol for getservbyport
When fixing an endianness bug, we changed the protocol unnecessarily.
Diffstat (limited to 'src/sss_client')
-rw-r--r-- | src/sss_client/nss_services.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/sss_client/nss_services.c b/src/sss_client/nss_services.c index 8f25781a1..159583d74 100644 --- a/src/sss_client/nss_services.c +++ b/src/sss_client/nss_services.c @@ -54,8 +54,8 @@ static void sss_nss_getservent_data_clean(void) { * * GETSERVBYPORT Request: * 0-3: 16-bit port number in network byte order - * 4-7: Reserved/padding - * 8-X: Zero-terminated string (protocol) + * 4-15: Reserved/padding + * 16-X: Zero-terminated string (protocol) * Protocol may be zero-length to imply "any" * * Replies: @@ -297,6 +297,7 @@ _nss_sss_getservbyport_r(int port, const char *protocol, /* Padding */ SAFEALIGN_SET_UINT16(data + p, 0, &p); + SAFEALIGN_SET_UINT32(data + p, 0, &p); if (protocol) { memcpy(data + p, protocol, proto_len + 1); |