openssh-server init script contains irrelevant --pidfile argument to start-stop-daemon

Bug #277120 reported by Chris Jones
4
Affects Status Importance Assigned to Milestone
openssh (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

openssh-server's init script passes the --pidfile argument to start-stop-daemon when starting sshd, but this appears to be irrelevant.

On an Intrepid machine I changed the argument to a non-default value and still the default /var/run/sshd.pid was created. This appears to be because sshd creates the file itself (controlled by the PidFile config option which defaults to to /var/run/sshd.pid).

I suggest removing this from at least the "start" stanza as it gives the impression that it will be honoured when it will not.

Revision history for this message
Thierry Carrez (ttx) wrote :

My understanding is that start-stop-daemon "--pidfile" option is used to match an existing process (and not start anything is it already exists), not to create a pidfile.

So it should be present AND match whatever is in PidFile ?

Revision history for this message
Chris Jones (cmsj) wrote :

Hmm, that's a good point, the manpage says:

       -p, --pidfile pid-file
              Check whether a process has created the file pid-file.

and since I was actually cloning things to have two sshd processes running on different ports, presumably start-stop-daemon was seeing the :22 one and not complaining.

I guess that means this is Invalid.

Mathias Gug (mathiaz)
Changed in openssh:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.