[Bug 815] RFE: sshd should be able to set environment variables defined by the client

bugzilla-daemon at mindrot.org bugzilla-daemon at mindrot.org
Mon Mar 22 00:28:33 EST 2004


http://bugzilla.mindrot.org/show_bug.cgi?id=815





------- Additional Comments From roland.mainz at nrubsig.org  2004-03-22 00:28 -------
Damien Miller wrote:
> If we implement this, we will probably only do it for a couple of environment
> variables (LANG and maybe LC_*) as passing arbitrary environment variables
> provides new opportunities for a user to break out of restricted shell.

Good idea. I suggest to add support for filtering name=value pairs via extended
regex pattern - one "accept" pattern and one "reject" pattern.

Anything which matches the "accept" pattern and doesn't match the "reject"
pattern should be accepted.

accecpt_pattern should look like this ("match all" for now):
".*=.*"

reject_pattern should look like this (kill linker and ssh env vars... and
DISPLAY since that's used by the X11 forwarding code):
"(^LD.*=.*|^SSH.*=.*|^DISPLAY.*=.*)"

Generally whitelisted should be:
CVSROOT
CVS_RSH
LANG
LC_MESSAGES
LC_TIME
LC_NUMERIC
LC_CTYPE
LC_MONETARY
LC_COLLATE
LC_PAPER
LC_ALL
LPDEST       (used by print spooler to set default printer)
PRINTER      (used by print spooler to set default printer)
PDPRINTER    (used by print spooler to set default printer)
XPRINTER     (used by Xprint - see http://xprint.mozdev.org)
XPSERVERLIST (used by Xprint - see http://xprint.mozdev.org)
TZ           (timezone)
MAIL         (unix mail folder location)



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.




More information about the openssh-bugs mailing list