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: "Ted C. Cheng" <tedcheng [at] symas.com>
- To: "Arthur de Jong" <arthur [at] arthurdejong.org>, "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 11:50:05 -0700
On Tue, 2010-07-20 at 16:35 -0700, Ted C. Cheng wrote:
Testing on Linux x86_64, one service entry is defined as: dn: cn=test_service1,ou=Services,dc=example,dc=com objectClass: top objectClass: ipService cn: test_service1 ipServicePort: 10001 <-- service port defined description: Symas SUUM services ipServiceProtocol: tcpThe service port returned from nss-pam-ldapd/nss/services.c, however, becomes 4391.
This is a bit strange. In my test environment getent returns the correct service number. The tests are in tests/test_nsscmds.sh.
# ./testgetservbyname debug servent.s_name: test_service1 servent.s_port: 4391 <-- wrong service port returned. servent.s_proto: tcp ./testgetservbyname: failed
Can you post the source for testgetservbyname? Note that the port number as returned by getservent() and friends is in network byte order (at least in Glibc). On what platform are you seeing this?
Please find attached source code for testgetservbyname.c. Platform information: Red Hat Enterprise Linux WS release 4 (Nahant Update 3) Linux host.symas.net 2.6.9-34.ELsmp #1 SMP x86_64 GNU/LinuxThe testing was via testgetservbyname <-> nss <-> nssov/slapd/back-ldap/pcache for client-side caching and disconnected operations when LDAP server is off-line.
Also note that the nslcd protocol uses host byte order as much as possible (except for IP addresses which are in network byte order most of the time anyway).
-- -- arthur - arthur@arthurdejong.org - http://arthurdejong.org --
Attachment:
testgetservbyname.c
Description: Binary 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,
Emmanuel Lesouef
- 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: 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
- Re: Losing users & groups from Active Directory 2008r2,
Emmanuel Lesouef
- Prev by Date: Re: LDAP referral, binding -> invalid credentials
- 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