[Bug 3140] support a token for XDG_RUNTIME_DIR
bugzilla-daemon at mindrot.org
bugzilla-daemon at mindrot.org
Fri Apr 10 11:46:59 AEST 2020
https://bugzilla.mindrot.org/show_bug.cgi?id=3140
Darren Tucker <dtucker at dtucker.net> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |dtucker at dtucker.net
--- Comment #1 from Darren Tucker <dtucker at dtucker.net> ---
I don't think this is something we want to do. At least not as a
%-TOKEN.
- there's no guarantee that the environment variable will exist at
all. Currently every attribute is guaranteed to exist, so the
semantics when it doesn't would not be clear (expand to nothing? leave
unexpanded? throw an error?).
- we don't currently do environment variables here and this opens a
whole other can of worms^W environment variables. There's only so many
letters on the keyboard.
- ssh and sshd are command line applications not desktop applications.
With the functionality added in #3014 you can construct the path in the
client's config file if you know the scheme it's using (eg
"RemoteForward /foo/bar /var/user/%i/baz") or look it up at runtime and
add the forward using ControlMaster (which also works if you want the
inverse direction, if you happen to want that):
$ echo 'ControlPath %d/.ssh/%C' >>~/.ssh/config
$ ssh -Nf -o controlmaster=yes server
$ remdir=$(ssh server 'echo $XDG_RUNTIME_DIR')
$ ssh -O forward -oRemoteForward="$remdir/S.gpg-agent /foo/bar" server
--
You are receiving this mail because:
You are watching someone on the CC list of the bug.
You are watching the assignee of the bug.
More information about the openssh-bugs
mailing list