diff options
author | Ulrich Müller <ulm@gentoo.org> | 2024-10-14 12:45:24 +0200 |
---|---|---|
committer | Ulrich Müller <ulm@gentoo.org> | 2024-10-18 19:54:35 +0200 |
commit | 2a3ae6dbbbf9f6ffbefa0c140b41fdcd1863fa2f (patch) | |
tree | bd3e73dfec352fe29941c0f65abdcc2abf00be0c /eclass | |
parent | cvs.eclass: Rewrite the ssh wrapper script in bash (diff) | |
download | gentoo-2a3ae6dbbbf9f6ffbefa0c140b41fdcd1863fa2f.tar.gz gentoo-2a3ae6dbbbf9f6ffbefa0c140b41fdcd1863fa2f.tar.bz2 gentoo-2a3ae6dbbbf9f6ffbefa0c140b41fdcd1863fa2f.zip |
cvs.eclass: New eclass variable ECVS_SSH_EXTRA_OPTS
This allows passing additional options to ssh.
Signed-off-by: Ulrich Müller <ulm@gentoo.org>
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/cvs.eclass | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/eclass/cvs.eclass b/eclass/cvs.eclass index 1289ee54cc3b..007240e6ba25 100644 --- a/eclass/cvs.eclass +++ b/eclass/cvs.eclass @@ -174,6 +174,12 @@ _CVS_ECLASS=1 # WARNING: If a SSH host key is not specified using this variable, the # remote host key will not be verified. +# @ECLASS_VARIABLE: ECVS_SSH_EXTRA_OPTS +# @DEFAULT_UNSET +# @DESCRIPTION: +# If SSH is used for "ext" authentication, this array variable can be +# used to pass additional options to the SSH command. + # @ECLASS_VARIABLE: ECVS_CLEAN # @DEFAULT_UNSET # @DESCRIPTION: @@ -376,6 +382,11 @@ cvs_fetch() { echo "${ECVS_SSH_HOST_KEY}" > "${known_hosts_file}" || die fi + local i quoted_opts=() + for i in "${!ECVS_SSH_EXTRA_OPTS[@]}"; do + printf -v "quoted_opts[i]" "%q" "${ECVS_SSH_EXTRA_OPTS[i]}" + done + # Create a wrapper script to pass additional options to SSH # Disable X11 forwarding which causes .xauth access violations @@ -387,6 +398,7 @@ cvs_fetch() { -oUserKnownHostsFile="${known_hosts_file}" \\ -oForwardX11=no \\ -oClearAllForwardings=yes \\ + ${quoted_opts[*]} \\ "\$@" EOF chmod a+x "${CVS_RSH}" || die |