summaryrefslogtreecommitdiff
path: root/debian/postinst
diff options
context:
space:
mode:
Diffstat (limited to 'debian/postinst')
-rw-r--r--debian/postinst12
1 files changed, 11 insertions, 1 deletions
diff --git a/debian/postinst b/debian/postinst
index 1b741c203..41221b9d6 100644
--- a/debian/postinst
+++ b/debian/postinst
@@ -280,9 +280,18 @@ set_sshd_permissions() {
280} 280}
281 281
282 282
283fix_ssh_group() {
284 # Try to remove non-system group mistakenly created by 1:3.5p1-1.
285 # set_ssh_agent_permissions() below will re-create it properly.
286 if getent group | grep -q '^ssh:'; then
287 delgroup --quiet ssh || true
288 fi
289}
290
291
283set_ssh_agent_permissions() { 292set_ssh_agent_permissions() {
284 if ! getent group | grep -q '^ssh:'; then 293 if ! getent group | grep -q '^ssh:'; then
285 addgroup --quiet ssh 294 addgroup --system --quiet ssh
286 fi 295 fi
287 if ! [ -x /usr/sbin/dpkg-statoverride ] || \ 296 if ! [ -x /usr/sbin/dpkg-statoverride ] || \
288 ! dpkg-statoverride --list /usr/bin/ssh-agent >/dev/null ; then 297 ! dpkg-statoverride --list /usr/bin/ssh-agent >/dev/null ; then
@@ -323,6 +332,7 @@ fix_statoverride
323create_alternatives 332create_alternatives
324setup_sshd_user 333setup_sshd_user
325set_sshd_permissions 334set_sshd_permissions
335if [ "$2" = "1:3.5p1-1" ]; then fix_ssh_group; fi
326set_ssh_agent_permissions 336set_ssh_agent_permissions
327setup_startup 337setup_startup
328setup_init 338setup_init