I don't know when make_scrambled_password() stopped being exported in libmysqlclient, but libmysqlclient's my_make_scrambled_password() is NOT a replacement for it. The right replacement for it is my_make_scrambled_password_sha1(), and currently make_scrambled_password() is a wrapper around my_make_scrambled_password_sha1(), but neither are exported in libmysqlclient:
/*
Wrapper around my_make_scrambled_password() to maintain client lib ABI
compatibility.
In server code usage of my_make_scrambled_password() is preferred to
avoid strlen().
SYNOPSIS
make_scrambled_password()
buf OUT buffer of size 2*SHA1_HASH_SIZE + 2 to store hex string
password IN NULL-terminated password string
*/
So pam_mysql should probably reimplement my_make_scrambled_password_sha1() in order to support passwords hashed with the server PASSWORD() function (the crypt=2 option in pam_mysql).
pure-ftpd sorted this out by reimplementing make_scrambled_ password( ) if it's not exported:
https:/ /github. com/jedisct1/ pure-ftpd/ commit/ 2db6b50c7b7c638 104bd9639994f05 74e8f4813c
I don't know when make_scrambled_ password( ) stopped being exported in libmysqlclient, but libmysqlclient's my_make_ scrambled_ password( ) is NOT a replacement for it. The right replacement for it is my_make_ scrambled_ password_ sha1(), and currently make_scrambled_ password( ) is a wrapper around my_make_ scrambled_ password_ sha1(), but neither are exported in libmysqlclient: scrambled_ password( ) to maintain client lib ABI scrambled_ password( ) is preferred to scrambled_ password( )
/*
Wrapper around my_make_
compatibility.
In server code usage of my_make_
avoid strlen().
SYNOPSIS
make_
buf OUT buffer of size 2*SHA1_HASH_SIZE + 2 to store hex string
password IN NULL-terminated password string
*/
void make_scrambled_ password( char *to, const char *password) scrambled_ password_ sha1(to, password, strlen(password));
{
my_make_
}
So pam_mysql should probably reimplement my_make_ scrambled_ password_ sha1() in order to support passwords hashed with the server PASSWORD() function (the crypt=2 option in pam_mysql).