2
0
mirror of https://github.com/xcat2/confluent.git synced 2024-11-22 09:32:21 +00:00

Allow blanking to disable a crypted password

This commit is contained in:
Jarrod Johnson 2021-11-17 09:00:58 -05:00
parent ef324daf52
commit cc1b887c31

View File

@ -1764,7 +1764,7 @@ class ConfigManager(object):
if attrib.startswith('crypted.'):
if not isinstance(curr[attrib], dict):
curr[attrib] = {'value': curr[attrib]}
if 'hashvalue' not in curr[attrib]:
if 'hashvalue' not in curr[attrib] and curr[attrib]['value']:
curr[attrib]['hashvalue'] = hashcrypt_value(
curr[attrib]['value'])
if 'grubhashvalue' not in curr[attrib]:
@ -2186,7 +2186,7 @@ class ConfigManager(object):
if attrib.startswith('crypted.'):
if not isinstance(curr[attrib], dict):
curr[attrib] = {'value': curr[attrib]}
if 'hashvalue' not in curr[attrib]:
if 'hashvalue' not in curr[attrib] and curr[attrib]['value']:
curr[attrib]['hashvalue'] = hashcrypt_value(
curr[attrib]['value'])
if 'grubhashvalue' not in curr[attrib]: