Re: Incorrect service port handling in nss/services.c
[Date Prev][Date Next] [Thread Prev][Thread Next]Re: Incorrect service port handling in nss/services.c
- From: Arthur de Jong <arthur [at] arthurdejong.org>
- To: nss-pam-ldapd-users <nss-pam-ldapd-users [at] lists.arthurdejong.org>
- Subject: Re: Incorrect service port handling in nss/services.c
- Date: Mon, 26 Jul 2010 22:24:52 +0200
On Mon, 2010-07-26 at 11:50 -0700, Ted C. Cheng wrote: > Please find attached source code for testgetservbyname.c. I'm afraid the problem is in your test code. Attached is a patch. The getservbyname(3) manual page says about s_port: "The port number for the service given in network byte order." so any client application should use ntohs() before use. Check it with an entry from /etc/services (e.g. www). With the patch it works on Debian Gnu/Linux squeeze (Glibc 2.11.2 on i386 but it was originally developed and tested on Glibc 2.3.2). Glibc has been known [1] to change byte order around for some internals but I don't think that is the case here. Anyway, thanks for testing nss-pam-ldapd. [1] http://sourceware.org/ml/glibc-cvs/2009-q3/msg00000.html -- -- arthur - arthur@arthurdejong.org - http://arthurdejong.org --
Attachment:
testgetservbyname.c.patch
Description: Text Data
-- To unsubscribe send an email to nss-pam-ldapd-users-unsubscribe@lists.arthurdejong.org or see http://lists.arthurdejong.org/nss-pam-ldapd-users
- Re: Losing users & groups from Active Directory 2008r2, (continued)
- Re: Losing users & groups from Active Directory 2008r2,
Arthur de Jong
- Incorrect service port handling in nss/services.c,
Ted C. Cheng
- Re: Incorrect service port handling in nss/services.c,
Arthur de Jong
- Re: Incorrect service port handling in nss/services.c, Ted C. Cheng
- Re: Incorrect service port handling in nss/services.c, Arthur de Jong
- Re: Incorrect service port handling in nss/services.c, Ted C. Cheng
- Re: Incorrect service port handling in nss/services.c, Arthur de Jong
- A few typos from syslog messages in pam/pam.c, Ted C. Cheng
- Re: A few typos from syslog messages in pam/pam.c, Arthur de Jong
- Re: Incorrect service port handling in nss/services.c,
Arthur de Jong
- Incorrect service port handling in nss/services.c,
Ted C. Cheng
- Re: Losing users & groups from Active Directory 2008r2,
Arthur de Jong
- Prev by Date: Re: Incorrect service port handling in nss/services.c
- Next by Date: Re: Incorrect service port handling in nss/services.c
- Previous by thread: Re: Incorrect service port handling in nss/services.c
- Next by thread: Re: Incorrect service port handling in nss/services.c