diff options
Diffstat (limited to 'debian')
-rw-r--r-- | debian/changelog | 6 | ||||
-rw-r--r-- | debian/openssh-server.postinst | 10 |
2 files changed, 16 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog index 4572dc0bd..56f09982f 100644 --- a/debian/changelog +++ b/debian/changelog | |||
@@ -1,3 +1,9 @@ | |||
1 | openssh (1:7.4p1-6) UNRELEASED; urgency=medium | ||
2 | |||
3 | * Remove temporary file on exit from postinst (closes: #850275). | ||
4 | |||
5 | -- Colin Watson <cjwatson@debian.org> Fri, 06 Jan 2017 08:40:14 +0000 | ||
6 | |||
1 | openssh (1:7.4p1-5) unstable; urgency=medium | 7 | openssh (1:7.4p1-5) unstable; urgency=medium |
2 | 8 | ||
3 | * Create mux socket for regression tests in a temporary directory. | 9 | * Create mux socket for regression tests in a temporary directory. |
diff --git a/debian/openssh-server.postinst b/debian/openssh-server.postinst index 391efc43b..90d346674 100644 --- a/debian/openssh-server.postinst +++ b/debian/openssh-server.postinst | |||
@@ -72,6 +72,15 @@ create_keys() { | |||
72 | } | 72 | } |
73 | 73 | ||
74 | 74 | ||
75 | new_config= | ||
76 | |||
77 | cleanup() { | ||
78 | if [ "$new_config" ]; then | ||
79 | rm -f "$new_config" | ||
80 | fi | ||
81 | } | ||
82 | |||
83 | |||
75 | create_sshdconfig() { | 84 | create_sshdconfig() { |
76 | # XXX cjwatson 2016-12-24: This debconf template is very confusingly | 85 | # XXX cjwatson 2016-12-24: This debconf template is very confusingly |
77 | # named; its description is "Disable SSH password authentication for | 86 | # named; its description is "Disable SSH password authentication for |
@@ -80,6 +89,7 @@ create_sshdconfig() { | |||
80 | db_get openssh-server/permit-root-login | 89 | db_get openssh-server/permit-root-login |
81 | permit_root_login="$RET" | 90 | permit_root_login="$RET" |
82 | 91 | ||
92 | trap cleanup EXIT | ||
83 | new_config="$(tempfile)" | 93 | new_config="$(tempfile)" |
84 | cp -a /usr/share/openssh/sshd_config "$new_config" | 94 | cp -a /usr/share/openssh/sshd_config "$new_config" |
85 | if [ "$permit_root_login" != true ]; then | 95 | if [ "$permit_root_login" != true ]; then |