mirror of
https://github.com/rclone/rclone.git
synced 2026-10-06 13:02:30 -04:00
Decrypting the config with --daemon runs --password-command twice, which means two authentications when the command needs one, such as a hardware key touch for `pass show`. SetConfigPassword saves the obscured key to the temp file named by _RCLONE_CONFIG_KEY_FILE so the daemon process can pick it up, but the process that wrote it then read and deleted that file itself before daemonizing. The daemon started with the variable pointing at a file that was already gone, found no key, and ran the password command again. Skip acquiring a password when _RCLONE_CONFIG_KEY_FILE is set, as the PassConfigKeyForDaemonization documentation already describes, and only consume the key file in a process that has no key of its own. The parent then leaves the key for the daemon, and the daemon uses it. Fixes #7341