config: use --password-command to set config file password if supplied

Before this change, rclone ignored the --password-command on the
rclone config setting except when decrypting an existing config file.

This change allows for offloading the password storage/generation into
external hardware key or other protected password storage.

Fixes #7859
This commit is contained in:
Nick Craig-Wood
2024-07-23 17:13:28 +01:00
parent c9c283533c
commit ffb2e2a6de
4 changed files with 50 additions and 3 deletions

View File

@@ -1928,7 +1928,8 @@ The default is `.partial`.
This flag supplies a program which should supply the config password
when run. This is an alternative to rclone prompting for the password
or setting the `RCLONE_CONFIG_PASS` variable.
or setting the `RCLONE_CONFIG_PASS` variable. It is also used when
setting the config password for the first time.
The argument to this should be a command with a space separated list
of arguments. If one of the arguments has a space in then enclose it