- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- getpwnam_r() failed on HPPA-11.23 using ldap
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-23-2005 10:11 AM
09-23-2005 10:11 AM
getpwnam_r() failed on HPPA-11.23 using ldap
We are using ldap to auth user through PAM.
When I tried to use getpwnam_r() in a multi-thread application, the code hung. The gdb showed:
(gdb) where
#0 0xc0bfb22c in _hp_ldap_send_recv_query (message_type=MTYPE_RSRVD_REQ,
cache_id=RSRVD0, request_data=0x0, request_size=0,
reply_data=0xb9a41d60 "", reply_size_max=512, nss_status=0xb9a409fc,
reply_size=0xb9a49d60) at ldapd_client.c:466
#1 0xc1f6d9cc in _query_daemon_pw (message_type=MTYPE_REQUEST, id=1,
op_type=0, argp=0xb9a40720, search_str=0x92ae12 "ldaptest", state_id=0x0,
result=0xb9a409fc) at getpwnam.c:81
#2 0xc1f6e8fc in getbynam (be=0x401efc10,
a=0xb9a40720 "\271\244\003\310\271\244\003\364") at getpwnam.c:381
#3 0x8b1a30 in nss_search+0x248 ()
#4 0x8aba4c in __getpwnam_r+0x7c ()
#5 0x8aa674 in getpwnam_r+0x68 ()
...
Any body knows why? And how can I resolve it?
Thanks,
Bohai
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-23-2005 05:24 PM
09-23-2005 05:24 PM
Re: getpwnam_r() failed on HPPA-11.23 using ldap
1) Which version of LDAP server you use ?
2) Is the server up and running ?
3) Use tusc to get a detailed information of system calls.
-Arun
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-26-2005 02:22 AM
09-26-2005 02:22 AM
Re: getpwnam_r() failed on HPPA-11.23 using ldap
Thanks for the reply. Here is my answer:
1. The version of LDAP server is:
# swlist |grep -i netscape
J4258CA B.06.11.20 Netscape Directory Server v6 for HP-UX
2. I think it is up and running.
root 795 1 0 Sep 21 ? 0:49 /opt/ldapux/bin/ldapclientd
And when I use a simple code (not multi-thread) to call the function, it works, which means it could get the right gid and uid.
3. I never used the "tusc" before. I'll try.
Bohai
P.S. If I use "chatr +q3p enable" command on the bionary, the getpwnam_r() call will failed (return value = 12) even in the single thread env.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-05-2005 09:08 AM
10-05-2005 09:08 AM
Re: getpwnam_r() failed on HPPA-11.23 using ldap
Bohai
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-05-2005 09:26 AM
10-05-2005 09:26 AM
Re: getpwnam_r() failed on HPPA-11.23 using ldap
This will get you lots of fun details on what went wrong. HP or other forumers will then be able to direct you to a solution.
Is LDAP server and system fully patched?
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-06-2005 06:59 AM
10-06-2005 06:59 AM
Re: getpwnam_r() failed on HPPA-11.23 using ldap
Thanks for the reply. I run a few time with tusc. Here is the result.
If the call of getpwnam() is within a thread (#46 in this case),
...
{86137} #46 open(0xc1f6ca58, O_RDONLY, 0666) ............. [entry]
{86137} #46 open("/etc/opt/ldapux/ldapux_client.conf", O_RDONLY, 0666) = 25
{86137} #46 ioctl(25, TCGETA, 0xb9a225e0) ................ [entry]
{86137} #46 ioctl(25, TCGETA, 0xb9a225e0) ................ ERR#25 ENOTTY
{86137} #46 read(25, 0x4030cfc8, 8192) ................... [entry]
{86137} #46 read(25, "# L D A P - U X C l i e n t ".., 8192) = 5294
{86137} #46 read(25, 0x4030cfc8, 8192) ................... [entry]
{86137} #46 read(25, 0x4030cfc8, 8192) ................... = 0
{86137} #46 close(25) .................................... [entry]
{86137} #46 close(25) .................................... = 0
I attached the info for thread #46.
I'll add anohter reply to attace the info if the call of getpwnam() is in the main thread.
Thanks for the help.
Bohai
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-06-2005 07:03 AM
10-06-2005 07:03 AM
Re: getpwnam_r() failed on HPPA-11.23 using ldap
Here comes the one which call getpwnam() from the main thread.
...
{90041} #1 poll(0x7a00ab78, 1, 0) ........................ [entry]
{90041} #1 poll(0x7a00ab78, 1, 0) ........................ = 1
{90041} #1 sendto(24, 0x7a00ab80, 36, 0, 0x79a71738, 0x1d) [entry]
{90041} #1 sendto(24, "f2\0\0010201\0c4\0\0\0\t\0\002\0".., 36, 0, 0x79a71738, 0
x1d) = 36
{90041} #1 poll(0x7a0147c8, 1, 200) ...................... [entry]
{90041} #1 poll(0x7a0147c8, 1, 200) ...................... = 1
{90041} #1 recv(24, 0x7a00bb80, 32768, 0) ................ [entry]
{90041} #1 recv(24, "f2\0\0010201\0\0\0\0\0X \0\0\0\0".., 32768, 0) = 115
If the call is from the main thread, the getpwnam() will return.
Cheers,
Bohai
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-06-2005 06:25 PM
10-06-2005 06:25 PM
Re: getpwnam_r() failed on HPPA-11.23 using ldap
http://www2.itrc.hp.com/service/cki/docDisplay.do?docLocale=en_US&docId=200000079976790
Apparently this problem should have been fixed in the latest version of LDAP-UX client (4.x) which you can download from www.software.hp.com.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-07-2005 03:39 AM
10-07-2005 03:39 AM
Re: getpwnam_r() failed on HPPA-11.23 using ldap
Thanks again.
Bohai
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-07-2005 05:14 AM
10-07-2005 05:14 AM
Re: getpwnam_r() failed on HPPA-11.23 using ldap
Cheers,
Bohai