2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-09-12 13:18:48 +00:00

Restore support for pre-configured passwords

This commit is contained in:
Jarrod Johnson
2017-03-16 16:35:49 -04:00
parent 1eb623cc4c
commit fcafd91d4b

View File

@@ -149,6 +149,11 @@ sub crypt_system_password {
"ERROR: Unable to get password from database table $table, key=$key");
return undef;
}
if (($password =~ /^\$1\$/) || ($password =~ /^\$5\$/) || ($password =~ /^\$6\$/)) {
# pre-crypted for our convenience
return $password;
}
$cryptmethod = $data->{'cryptmethod'};
if (!$cryptmethod) {
# Use sha256 crypt method by default