diff options
-rw-r--r-- | debian/changelog | 2 | ||||
-rw-r--r-- | debian/control | 2 | ||||
-rw-r--r-- | debian/openssh-server.postinst | 11 |
3 files changed, 13 insertions, 2 deletions
diff --git a/debian/changelog b/debian/changelog index 66a338497..dceddd7fa 100644 --- a/debian/changelog +++ b/debian/changelog | |||
@@ -2,6 +2,8 @@ openssh (1:4.3p2-3) UNRELEASED; urgency=low | |||
2 | 2 | ||
3 | * Document KeepAlive->TCPKeepAlive renaming in sshd_config(5) (closes: | 3 | * Document KeepAlive->TCPKeepAlive renaming in sshd_config(5) (closes: |
4 | https://launchpad.net/bugs/50702). | 4 | https://launchpad.net/bugs/50702). |
5 | * Change sshd user's shell to /usr/sbin/nologin (closes: #366541). | ||
6 | Introduces dependency on passwd for usermod. | ||
5 | * debconf template translations: | 7 | * debconf template translations: |
6 | - Update French (thanks, Denis Barbier; closes: #368503). | 8 | - Update French (thanks, Denis Barbier; closes: #368503). |
7 | - Update Dutch (thanks, Bart Cornelis; closes: #375100). | 9 | - Update Dutch (thanks, Bart Cornelis; closes: #375100). |
diff --git a/debian/control b/debian/control index 3bf6f513d..b95d1f759 100644 --- a/debian/control +++ b/debian/control | |||
@@ -8,7 +8,7 @@ Uploaders: Colin Watson <cjwatson@debian.org> | |||
8 | 8 | ||
9 | Package: openssh-client | 9 | Package: openssh-client |
10 | Architecture: any | 10 | Architecture: any |
11 | Depends: ${shlibs:Depends}, ${debconf-depends}, adduser (>= 3.10), dpkg (>= 1.7.0) | 11 | Depends: ${shlibs:Depends}, ${debconf-depends}, adduser (>= 3.10), dpkg (>= 1.7.0), passwd |
12 | Conflicts: ssh (<< 1:3.8.1p1-9), sftp, rsh-client (<<0.16.1-1), ssh-krb5 | 12 | Conflicts: ssh (<< 1:3.8.1p1-9), sftp, rsh-client (<<0.16.1-1), ssh-krb5 |
13 | Replaces: ssh (<< 1:3.8.1p1-9), ssh-krb5 | 13 | Replaces: ssh (<< 1:3.8.1p1-9), ssh-krb5 |
14 | Suggests: ssh-askpass, xbase-clients | 14 | Suggests: ssh-askpass, xbase-clients |
diff --git a/debian/openssh-server.postinst b/debian/openssh-server.postinst index ccacb411a..1ac6906da 100644 --- a/debian/openssh-server.postinst +++ b/debian/openssh-server.postinst | |||
@@ -289,9 +289,15 @@ fix_statoverride() { | |||
289 | fi | 289 | fi |
290 | } | 290 | } |
291 | 291 | ||
292 | fix_sshd_shell() { | ||
293 | if getent passwd sshd | grep ':/bin/false$'; then | ||
294 | usermod -s /usr/sbin/nologin sshd | ||
295 | fi | ||
296 | } | ||
297 | |||
292 | setup_sshd_user() { | 298 | setup_sshd_user() { |
293 | if ! getent passwd sshd >/dev/null; then | 299 | if ! getent passwd sshd >/dev/null; then |
294 | adduser --quiet --system --no-create-home --home /var/run/sshd sshd | 300 | adduser --quiet --system --no-create-home --home /var/run/sshd --shell /usr/sbin/nologin sshd |
295 | fi | 301 | fi |
296 | } | 302 | } |
297 | 303 | ||
@@ -318,6 +324,9 @@ create_sshdconfig | |||
318 | check_idea_key | 324 | check_idea_key |
319 | create_keys | 325 | create_keys |
320 | fix_statoverride | 326 | fix_statoverride |
327 | if dpkg --compare-versions "$2" lt 1:4.3p2-3; then | ||
328 | fix_sshd_shell | ||
329 | fi | ||
321 | setup_sshd_user | 330 | setup_sshd_user |
322 | if dpkg --compare-versions "$2" lt 1:3.6.1p2-2; then | 331 | if dpkg --compare-versions "$2" lt 1:3.6.1p2-2; then |
323 | fix_conffile_permissions | 332 | fix_conffile_permissions |