diff options
author | Colin Watson <cjwatson@debian.org> | 2017-04-22 03:16:08 +0100 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2017-04-22 03:16:08 +0100 |
commit | 3e0b14c8cd9a0b985c289b1c57604aeb9a65e0e2 (patch) | |
tree | 3406880179e977b1ce1378d1c6d98c0d5ab41be1 | |
parent | ad89e83f850573fe8bf620e4572c1b0f687614a2 (diff) |
Ensure that /etc/ssh exists before trying to create /etc/ssh/sshd_config (LP: #1685022).
-rw-r--r-- | debian/changelog | 2 | ||||
-rw-r--r-- | debian/openssh-server.postinst | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog index d2d626831..cc5fd3e8b 100644 --- a/debian/changelog +++ b/debian/changelog | |||
@@ -5,6 +5,8 @@ openssh (1:7.5p1-3) UNRELEASED; urgency=medium | |||
5 | * Adjust OpenSSL dependencies for openssh-client-ssh1 too. | 5 | * Adjust OpenSSL dependencies for openssh-client-ssh1 too. |
6 | * Fix purge failure when /etc/ssh has already somehow been removed | 6 | * Fix purge failure when /etc/ssh has already somehow been removed |
7 | (LP: #1682817). | 7 | (LP: #1682817). |
8 | * Ensure that /etc/ssh exists before trying to create /etc/ssh/sshd_config | ||
9 | (LP: #1685022). | ||
8 | 10 | ||
9 | -- Colin Watson <cjwatson@debian.org> Sat, 08 Apr 2017 15:39:13 +0100 | 11 | -- Colin Watson <cjwatson@debian.org> Sat, 08 Apr 2017 15:39:13 +0100 |
10 | 12 | ||
diff --git a/debian/openssh-server.postinst b/debian/openssh-server.postinst index f0ebe48b8..8b554ee1e 100644 --- a/debian/openssh-server.postinst +++ b/debian/openssh-server.postinst | |||
@@ -96,6 +96,7 @@ create_sshdconfig() { | |||
96 | sed -i 's/^#*PermitRootLogin .*/PermitRootLogin yes/' \ | 96 | sed -i 's/^#*PermitRootLogin .*/PermitRootLogin yes/' \ |
97 | "$new_config" | 97 | "$new_config" |
98 | fi | 98 | fi |
99 | mkdir -p /etc/ssh | ||
99 | ucf --three-way --debconf-ok \ | 100 | ucf --three-way --debconf-ok \ |
100 | --sum-file /usr/share/openssh/sshd_config.md5sum \ | 101 | --sum-file /usr/share/openssh/sshd_config.md5sum \ |
101 | "$new_config" /etc/ssh/sshd_config | 102 | "$new_config" /etc/ssh/sshd_config |