Skip to content

Commit b93603b

Browse files
committed
MB-53547 MB-53550 Merge branch 'mad-hatter' into cheshire-cat
* mad-hatter: MB-53550 Fix 'master-password' command MB-53550 [BP] Don't leak cookie in master-password MB-53547 [BP] Pass password to erlang in env Change-Id: I180d7286e04f0640ff49456bee674e35d666f288
2 parents d77d47c + 4940bf1 commit b93603b

1 file changed

Lines changed: 10 additions & 7 deletions

File tree

cbmgr.py

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1548,15 +1548,18 @@ def prompt_for_master_pwd(self, node, cookie, password, cb_cfg_path):
15481548
if password == '':
15491549
password = getpass.getpass("\nEnter master password:")
15501550

1551-
name = 'executioner@cb.local'
1552-
args = ['-pa', CB_NS_EBIN_PATH, CB_BABYSITTER_EBIN_PATH, '-noinput', '-name', name, '-proto_dist', 'cb',
1553-
'-eval', 'erlang:set_cookie(node(), list_to_atom(os:getenv("CB_COOKIE"))).', '-epmd_module', 'cb_epmd',
1554-
'-kernel'] + CB_INETRC_OPT + \
1555-
['dist_config_file', f'"{dist_cfg_file}"', '-run', 'encryption_service',
1556-
'remote_set_password', node]
1551+
args = [
1552+
'-pa', CB_NS_EBIN_PATH, CB_BABYSITTER_EBIN_PATH,
1553+
'-noinput',
1554+
'-name', 'executioner@cb.local',
1555+
'-proto_dist', 'cb',
1556+
'-epmd_module', 'cb_epmd',
1557+
'-kernel', *CB_INETRC_OPT, 'dist_config_file', f'"{dist_cfg_file}"',
1558+
'-eval', 'erlang:set_cookie(node(), list_to_atom(os:getenv("CB_COOKIE"))).',
1559+
'-run', 'encryption_service', 'remote_set_password', node,
1560+
]
15571561

15581562
rc, out, err = self.run_process("erl", args, extra_env={'SETPASSWORD': password, 'CB_COOKIE': cookie})
1559-
15601563
if rc == 0:
15611564
print("SUCCESS: Password accepted. Node started booting.")
15621565
elif rc == 101:

0 commit comments

Comments
 (0)