On Mon, 30 Jan 2006, Thorsten Kukuk wrote: > On Mon, Jan 30, Mike Becher wrote: > > > On Fri, 27 Jan 2006, Thorsten Kukuk wrote: > > > > > On Thu, Jan 05, Mike Becher wrote: > > > > The second problem is that from gethostbyname only the first IP is > > > used. This was already broken in the old version, but now it depends > > > on if the IPv4 or the IPv6 address is the first one which is returned, > > > pure luck if this is really working. > > > getaddrinfo should be used instead. > > I know thread safety and reentrants are two different things and if one > > function is thread safe and/or reentrant depends on usage of function > > that are also thread safe and/or reentrant. > > thread safe and reentrant are the same. If a function is reentrant, it > is thread safe, too. If a function is thread safe, it is reentrant, too. This is NOT correct. If a piece of code is reentrant then it is thread safe too. But if it is thread safe it can be reentrant nut must not be reentrant. Thread safety can be achieved also through other mechanism like for example semaphores or such things to serialize access. Thats why these are two differnet things. Please have a look at http://thread-safe.iqnaut.net then you will find out the difference. > > Currently I'm rewriting this parts which use convert_hostname_r to > use getaddrinfo, which is reentrant and which will check for all > known IPs, not only the first one. Ok, thanks for your effords. best regards, mike > > Thorsten > > -- > Thorsten Kukuk http://www.suse.de/~kukuk/ kukuk@xxxxxxx > SUSE LINUX Products GmbH Maxfeldstr. 5 D-90409 Nuernberg > -------------------------------------------------------------------- > Key fingerprint = A368 676B 5E1B 3E46 CFCE 2D97 F8FD 4E23 56C6 FB4B > > _______________________________________________ > > Pam-list@xxxxxxxxxx > https://www.redhat.com/mailman/listinfo/pam-list > ----------------------------------------------------------------------------- Mike Becher Mike.Becher@xxxxxxxxxxxxxxx Leibniz-Rechenzentrum der http://www.lrz.de Bayerischen Akademie der Wissenschaften phone: +49-89-289-28721 Gruppe Hochleistungssysteme fax: +49-89-280-9460 Barer Strasse 21 D-80333 Muenchen Germany ----------------------------------------------------------------------------- _______________________________________________ Pam-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/pam-list