diff options
author | Colin Watson <cjwatson@debian.org> | 2014-11-06 10:32:11 +0000 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2014-11-06 11:19:05 +0000 |
commit | 3877ccdad6c7ba342531508e1d41d1d816b2a7c7 (patch) | |
tree | ad411f8c5034b4e377a0be81c3cfc291b1f66afb /debian/openssh-server.postinst | |
parent | 4b17ed4c6a5106a0f9a83e734ec67a4067ad36b5 (diff) | |
parent | 44f0937b56758f662ff388d474213107e3290863 (diff) |
Send/accept only specific known LC_* variables, rather than using a wildcard (closes: #765633).
Diffstat (limited to 'debian/openssh-server.postinst')
-rw-r--r-- | debian/openssh-server.postinst | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/debian/openssh-server.postinst b/debian/openssh-server.postinst index 5131b2647..12ccb4f76 100644 --- a/debian/openssh-server.postinst +++ b/debian/openssh-server.postinst | |||
@@ -147,6 +147,13 @@ update_server_key_bits() { | |||
147 | } | 147 | } |
148 | 148 | ||
149 | 149 | ||
150 | update_accept_env() { | ||
151 | if [ "$(get_config_option AcceptEnv)" = 'LANG LC_*' ]; then | ||
152 | set_config_option AcceptEnv 'LANG LC_ADDRESS LC_COLLATE LC_CTYPE LC_IDENTIFICATION LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER LC_TELEPHONE LC_TIME LC_ALL' | ||
153 | fi | ||
154 | } | ||
155 | |||
156 | |||
150 | create_sshdconfig() { | 157 | create_sshdconfig() { |
151 | if [ -e /etc/ssh/sshd_config ] ; then | 158 | if [ -e /etc/ssh/sshd_config ] ; then |
152 | # Upgrade an existing sshd configuration. | 159 | # Upgrade an existing sshd configuration. |
@@ -168,6 +175,10 @@ create_sshdconfig() { | |||
168 | update_server_key_bits | 175 | update_server_key_bits |
169 | fi | 176 | fi |
170 | 177 | ||
178 | if dpkg --compare-versions "$oldversion" lt 1:6.7p1-4; then | ||
179 | update_accept_env | ||
180 | fi | ||
181 | |||
171 | return 0 | 182 | return 0 |
172 | fi | 183 | fi |
173 | 184 | ||
@@ -246,7 +257,7 @@ TCPKeepAlive yes | |||
246 | #Banner /etc/issue.net | 257 | #Banner /etc/issue.net |
247 | 258 | ||
248 | # Allow client to pass locale environment variables | 259 | # Allow client to pass locale environment variables |
249 | AcceptEnv LANG LC_* | 260 | AcceptEnv LANG LC_ADDRESS LC_COLLATE LC_CTYPE LC_IDENTIFICATION LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER LC_TELEPHONE LC_TIME LC_ALL |
250 | 261 | ||
251 | Subsystem sftp /usr/lib/openssh/sftp-server | 262 | Subsystem sftp /usr/lib/openssh/sftp-server |
252 | 263 | ||