Operating System - HP-UX
1748169 Members
4295 Online
108758 Solutions
New Discussion

getpwuid() problem on HPUX 11

 
Peng-Nien Yu
New Member

getpwuid() problem on HPUX 11

We recently have encountered incompatible problem of getpwuid() UNIX system call between HPUX10.10 And HPUX11. We have to compile our source code on HPUX10.10 because some of our customers are still Using HPUX10.10. But when our HPUX10.10 compiled binary code running on HPUX 11, getpwuid() system call returns NULL if the ?+? sign is removed from /etc/passwd file.

When we compiled our source code on HPUX10.10, we did not use any ?lc options. I guess the default of linker should find the shared library instead of archive library. Also /etc/nsswitch.conf does define the following line:

passwd: files nis

But getpwuid() system call still returns NULL, if ?+? sign is not in the /etc/passwd file.

Besides, if we do put the ?+? sign in the /etc/passwd file and use NIS+ instead of NIS in /etc/nsswitch.conf:

passwd: files nis+

the getpwuid() system call did not work either.

Is there a way to make the getpwuid() work on HPUX11 if our source is compiled on HPUX10.10 and ?+? sign was not defined in /etc/passwd file>