leave {SHA512-CRYPT} in place

This commit is contained in:
Matthew Saunders Brown 2021-11-10 13:35:01 -08:00
parent 20524cfef5
commit c121d48f74
2 changed files with 2 additions and 2 deletions

View File

@ -48,7 +48,7 @@ rowcount=`mysql --defaults-extra-file=$MYSQL_CONNECTION_INFO_FILE -s -r -N -e "S
if [ "$rowcount" -eq '0' ] ; then if [ "$rowcount" -eq '0' ] ; then
# mbox does not exist, build SQL # mbox does not exist, build SQL
# first encrypt password # first encrypt password
passwd=`doveadm -o stats_writer_socket_path= pw -s sha512-crypt -p "$password"|sed 's|^{SHA512-CRYPT}||'` passwd=`doveadm -o stats_writer_socket_path= pw -s sha512-crypt -p "$password"`
dbcmd="mysql --defaults-extra-file=$MYSQL_CONNECTION_INFO_FILE -e 'INSERT INTO vm_mboxes SET domain_id=\"$domain_id\", mbox=\"$mbox\", passwd=\"$passwd\"" dbcmd="mysql --defaults-extra-file=$MYSQL_CONNECTION_INFO_FILE -e 'INSERT INTO vm_mboxes SET domain_id=\"$domain_id\", mbox=\"$mbox\", passwd=\"$passwd\""
if [[ -n $status ]] ; then if [[ -n $status ]] ; then
dbcmd="$dbcmd, status=\"$status\"" dbcmd="$dbcmd, status=\"$status\""

View File

@ -56,7 +56,7 @@ fi
# check for password update # check for password update
if [ ! -z "$password" ]; then if [ ! -z "$password" ]; then
passwd=`doveadm -o stats_writer_socket_path= pw -s sha512-crypt -p "$passwd"|sed 's|^{SHA512-CRYPT}||'` passwd=`doveadm -o stats_writer_socket_path= pw -s sha512-crypt -p "$passwd"`
if [ ! -z "$dbset" ]; then if [ ! -z "$dbset" ]; then
dbset="$dbset," dbset="$dbset,"
fi fi