assistant: Fix ~/.ssh/git-annex-shell wrapper to work when the ssh key does not force a command.
Without a forced command, SSH_ORIGINAL_COMMAND is not set. So instead, in this case, run $@
This commit is contained in:
parent
e5f812c4c3
commit
796f1d806f
3 changed files with 19 additions and 7 deletions
|
@ -127,8 +127,13 @@ addAuthorizedKeysCommand rsynconly dir pubkey = join "&&"
|
|||
script =
|
||||
[ shebang
|
||||
, "set -e"
|
||||
, "exec git-annex-shell -c \"$SSH_ORIGINAL_COMMAND\""
|
||||
, "if [ \"x$SSH_ORIGINAL_COMMAND\" != \"x\" ]; then"
|
||||
, runshell "$SSH_ORIGINAL_COMMAND"
|
||||
, "else"
|
||||
, runshell "$@"
|
||||
, "fi"
|
||||
]
|
||||
runshell var = "exec git-annex-shell -c \"" ++ var ++ "\""
|
||||
|
||||
authorizedKeysLine :: Bool -> FilePath -> SshPubKey -> String
|
||||
authorizedKeysLine rsynconly dir pubkey
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue