Fix ndbm.h include problems with brain-dead glibc >= 2.1 which has ndbm.h in a non-standard db1/ subdir. We fixed it by explicitly including <db1/ndbm.h> instead of <ndbm.h> because adding -I/usr/include/db1 isn't really correct (because it isn't guaranteed that the glibc includes are really under /usr/include).
Submitted by: Henri Gomez <email@example.com> Cleaned up and corrected by: Ralf S. Engelschall PR: 4469, 4431, 4528
Rework the ap_MD5Encode() routine to use FreeBSD's algorithm and a private significator ("$apr1"); also make it reentrant. Abstract the password checking into a new routine, ap_validate_password(plaintext, hashed), and modify mod_auth*.c to use it instead of each doing the algorithm check.