OpenSSH 2.3.0p1: Problem with the init script in the RPM

Sergey Vlasov vsu at mivlgu.murom.ru
Sat Dec 16 06:31:45 EST 2000


Pekka Savola wrote:
> 
> On Fri, 15 Dec 2000, Sergey Vlasov wrote:
> > There is a problem in the contrib/redhat/sshd.init script: it starts
> > sshd without specifying the full path (/usr/bin/sshd for the RPM
> > installation). The daemon starts up and works, but dies when it receives
> > a SIGHUP, because it is unable to re-exec itself without the full path.
> 
> This has been noted before (by me, at least).
> 
> The problem is that sshd might not always be in /usr/sbin; for example,
> if you redefine %{_prefix} in your rpm macros to make all RPM's go under
> /usr/local (as a company policy, for example..), the script won't work.
> 
> These people are a small minority, though.  The change would be good for
> most people, but it might create problems for others.

Then what about doing this:

 perl -pi -e 's,/usr/sbin/sshd,%{sbindir}/sshd,' \
	$RPM_BUILD_ROOT/etc/rc.d/init.d/sshd

in %install? The RPM is not relocatable anyway.

Anyway, the older sshd.init-5.x and the SuSE script just use
/usr/sbin/sshd. If someone wants to use non-default directories, they
should know how to deal with these problems.





More information about the openssh-unix-dev mailing list