gethostbyname problem ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,
is there any incompatibility between the gethostby* resolver functions and a pam modules ?


What I observe is that if I call gethostbyname() from within a pam module, the hostname I'm looking for is only found if the domain it is part of is the first one listed in resolv.conf.

To give a small example, suppose I'm looking for a host named "db" which exists(dns) in the domain s.foo.com but not in t.foo.com. If my resolv.conf has "search s.foo.com t.foo.com", gethostbyname finds it but if resolv.conf contains "search t.foo.com s.foo.com" it does not find it.

If I take out that code from the pam module and run it as a regularapplication, then gethostbyname always finds the host.

What makes me think the problem/feature could be related to pam is that I've noticed pam_ldap.so has the same behaviour: if pam_ldap.conf has the line "host ldap", pam_ldap.so only finds ldap.s.foo.com if s.foo.com is listed first in resolv.conf.

Am I missing something ?

Best regards,
Didier


_______________________________________________ Pam-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/pam-list

[Index of Archives]     [Fedora Users]     [Kernel]     [Red Hat Install]     [Linux for the blind]     [Gimp]

  Powered by Linux