In 2.2 versions of Samba we issue stat to the user's Unix home directory during session setup in reply.c during check_domain_security (even if add user script is not being invoked). This can cause unnecessary delays or hangs if the local unix home directory is automounted. The fix was trivial and is now checked into 2.2.9pre
Changed check for lp_adduser_script to properly check for empty string in check_domain_security in smbd/reply.c
database cleanup