[Bug 1285] provide fallback options /etc/ssh/ssh_config

bugzilla-daemon at mindrot.org bugzilla-daemon at mindrot.org
Tue Sep 17 10:05:50 EST 2013


https://bugzilla.mindrot.org/show_bug.cgi?id=1285

Flavio Poletti <flavio at polettix.it> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |flavio at polettix.it

--- Comment #8 from Flavio Poletti <flavio at polettix.it> ---
Created attachment 2336
  --> https://bugzilla.mindrot.org/attachment.cgi?id=2336&action=edit
Patch to address fallback options to SendEnv

This patch allows the specification of negated patterns in SendEnv.
Hence, you can set e.g.:

Host whatever
   SendEnv !LANG !LC_*

in your ~/.ssh/config file, and this will override (eliminating it) any
global option like:

Host *
   SendEnv LANG LC_*

that might be inaccessible to non-root users.

The patch relies on the order of evaluation of the patterns to match.
This assumes that the patterns from the user-local files are evaluated
before global ones. This assumption is consistent with the behavior
described in the documentation and should be safe to consider this as
stable. This means that it is possible to set different negations with
respect to the "direct" patterns:

Host my host
    SendEnv !*

The example above just disables sending any environment variable.

The patch is straightforward and might be adapted to other similar
cases (LocalForward, DynamicForward, IdentityFile, and RemoteForward as
pointed out by Joe Wells).

-- 
You are receiving this mail because:
You are watching the assignee of the bug.
You are watching someone on the CC list of the bug.


More information about the openssh-bugs mailing list