diff options
Diffstat (limited to 'debian/postinst')
-rw-r--r-- | debian/postinst | 12 |
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 | ||
283 | fix_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 | |||
283 | set_ssh_agent_permissions() { | 292 | set_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 | |||
323 | create_alternatives | 332 | create_alternatives |
324 | setup_sshd_user | 333 | setup_sshd_user |
325 | set_sshd_permissions | 334 | set_sshd_permissions |
335 | if [ "$2" = "1:3.5p1-1" ]; then fix_ssh_group; fi | ||
326 | set_ssh_agent_permissions | 336 | set_ssh_agent_permissions |
327 | setup_startup | 337 | setup_startup |
328 | setup_init | 338 | setup_init |