Skip to content

Commit 0eaaffe

Browse files
committed
MB-53547 MB-53550 Merge branch 'cheshire-cat' into neo
* cheshire-cat: 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: I85283976f87d9dd7ee78819e72e251861a34a080
2 parents 17704c5 + b93603b commit 0eaaffe

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
@@ -1679,15 +1679,18 @@ def prompt_for_master_pwd(self, node, cookie, password, cb_cfg_path):
16791679
if password == '':
16801680
password = getpass.getpass("\nEnter master password:")
16811681

1682-
name = 'executioner@cb.local'
1683-
args = ['-pa', CB_NS_EBIN_PATH, CB_BABYSITTER_EBIN_PATH, '-noinput', '-name', name, '-proto_dist', 'cb',
1684-
'-eval', 'erlang:set_cookie(node(), list_to_atom(os:getenv("CB_COOKIE"))).', '-epmd_module', 'cb_epmd',
1685-
'-kernel'] + CB_INETRC_OPT + \
1686-
['dist_config_file', f'"{dist_cfg_file}"', '-run', 'encryption_service',
1687-
'remote_set_password', node]
1682+
args = [
1683+
'-pa', CB_NS_EBIN_PATH, CB_BABYSITTER_EBIN_PATH,
1684+
'-noinput',
1685+
'-name', 'executioner@cb.local',
1686+
'-proto_dist', 'cb',
1687+
'-epmd_module', 'cb_epmd',
1688+
'-kernel', *CB_INETRC_OPT, 'dist_config_file', f'"{dist_cfg_file}"',
1689+
'-eval', 'erlang:set_cookie(node(), list_to_atom(os:getenv("CB_COOKIE"))).',
1690+
'-run', 'encryption_service', 'remote_set_password', node,
1691+
]
16881692

16891693
rc, out, err = self.run_process("erl", args, extra_env={'SETPASSWORD': password, 'CB_COOKIE': cookie})
1690-
16911694
if rc == 0:
16921695
print("SUCCESS: Password accepted. Node started booting.")
16931696
elif rc == 101:

0 commit comments

Comments
 (0)