Bug#1024592: systemd configuration for inetd mode is broken in 1:9.1p1-1

Eugene Berdnikov <[email protected]>
Newsgroups gmane.linux.debian.devel.ssh
Message-ID <Y3vlX8FFfpF3i6xy__21138.0771988601$1669065517$gmane$org@sony.protva.ru>
Package: openssh-server
Version: 1:9.1p1-1
Severity: minor

 After upgrade from 1:9.0p1-1+b1 to 1:9.1p1-1 sshd starts under systemd
 as standalone daemon only.

 1. File /lib/systemd/system/[email protected] is missing in 1:9.1p1-1,
    while /lib/systemd/system/ssh.socket is present.
    So sshd can not be run as inetd-style service, because ".socket"
    requires apropriate "@.service" unit.

 2. Unit file /lib/systemd/system/ssh.socket has considerable changes
    in comparison with old 1:9.0p1-1+b1. First, it's [Unit] section
    has "Before=sockets.target", and [Install] section has
    "WantedBy=sockets.target", it seems contradictionry to me.
    Then, old version 1:9.0p1-1+b1 has two options in this section:
    "Before=ssh.service" and "Conflicts=ssh.service". It prevents
    from concurent access to listening socket. New package 1:9.1p1-1
    has no such options.

 Result: with ssh.service=disabled and ssh.socket=enabled port 22 is
 listened by two process: by systemd and by sshd daemon. All incoming
 connections are handled by standalone sshd daemon, probably because
 systemd can't handle them due to absence of @.service unit file.

 If unit files ssh.socket and [email protected] are taken from old package,
 all works right as expected.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.