Skip to content

Commit

Permalink
bugfix for --passwd-file not working on latest version (#5934)
Browse files Browse the repository at this point in the history
bugfix for --passwd-file not working on latest version (#5934)

Fix a dsconf fails because a naming mismatch between argparse parameters and args attribute)
Solved by using consistent naming while keeping old name for compatibility

Issue: #5935

Reviewer: @tbordaz @progier389 @droideck
  • Loading branch information
strzh committed Oct 13, 2023
1 parent 415eead commit f52d10a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/lib389/lib389/cli_conf/replication.py
Original file line number Diff line number Diff line change
Expand Up @@ -633,6 +633,8 @@ def create_repl_manager(inst, basedn, log, args):
if args.passwd is not None:
repl_manager_password = args.passwd
elif args.passwd_file is not None:
repl_manager_password = get_passwd_from_file(args.passwd_file)
elif args.bind_passwd_file is not None:
repl_manager_password = get_passwd_from_file(args.bind_passwd_file)
elif repl_manager_password == "":
repl_manager_password = _get_arg(None, msg=f"Enter replication manager password for \"{manager_dn}\"",
Expand Down Expand Up @@ -1348,7 +1350,8 @@ def create_parser(subparsers):
"entry's DN would be \"cn=replication manager,cn=config\".")
repl_add_manager_parser.add_argument('--passwd', help="Sets the password for replication manager. If not provided, "
"you will be prompted for the password")
repl_add_manager_parser.add_argument('--passwd-file', help="File containing the password")
repl_add_manager_parser.add_argument('--passwd-file', help="File containing the password for back compatibility")
repl_add_manager_parser.add_argument('--bind-passwd-file', help="File containing the password")
repl_add_manager_parser.add_argument('--suffix', help='The DN of the replication suffix whose replication ' +
'configuration you want to add this new manager to (OPTIONAL)')

Expand Down

0 comments on commit f52d10a

Please sign in to comment.