Timeouts in HEAD ldap code.

Jeremy Allison jra at samba.org
Sat May 28 00:22:14 GMT 2005


Volker, I need to talk to you about the timeouts in the
HEAD LDAP code and the changes you made in lib/util_sock.c
to allow them.

You were using the non-EINTR safe versions of select, and
so any incoming tdb message would cause the LDAP operation
to abort (you were relying on an alarm() to generate a
signal if the operation took too long). I don't think this
is the correct thing to do, we need to ensure that the
LDAP read/write ops time out correctly given "endtime",

To do this the LDAP socket needs to be in nonblocking
mode (IMHO), which we're not currently doing.

Essentially, the LDAP code doesn't look async signal
safe to me, and we need to fix that.

Either that, or you need to split off your read_data_until()
write_data_until() functions and put them into the LDAP code
to make sure they're not used from the generic SMB socket
calls.

Jeremy.


More information about the samba-technical mailing list