1
0
mirror of https://github.com/rclone/rclone.git synced 2025-12-31 15:43:53 +00:00

mountlib: fix mount --daemon not working with encrypted config - fixes #2473

This passes the configKey to the child process as an Obscured temporary file with an environment variable to the
This commit is contained in:
Alex Chen
2018-08-21 16:41:16 +08:00
committed by Nick Craig-Wood
parent f9cf70e3aa
commit c6c74cb869
2 changed files with 72 additions and 10 deletions

View File

@@ -10,6 +10,7 @@ import (
"github.com/ncw/rclone/cmd"
"github.com/ncw/rclone/fs"
"github.com/ncw/rclone/fs/config"
"github.com/ncw/rclone/fs/config/flags"
"github.com/ncw/rclone/vfs"
"github.com/ncw/rclone/vfs/vfsflags"
@@ -216,6 +217,11 @@ be copied to the vfs cache before opening with --vfs-cache-mode full.
` + vfs.Help,
Run: func(command *cobra.Command, args []string) {
cmd.CheckArgs(2, 2, command, args)
if Daemon {
config.PassConfigKeyForDaemonization = true
}
fdst := cmd.NewFsDir(args)
// Show stats if the user has specifically requested them