Subject: pkg/21353: pkgsrc ssh rc.d script needs fix
To: None <>
From: None <>
List: netbsd-bugs
Date: 04/28/2003 21:09:08
>Number:         21353
>Category:       pkg
>Synopsis:       $0 may be "rc" in keygen in pkgsrc ssh rc.d script
>Confidential:   yes
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Apr 29 04:10:00 UTC 2003
>Release:        NetBSD 1.6
System: NetBSD 1.6 NetBSD 1.6 (JCR-20020927) #3: Sat Sep 28 13:40:20 PDT 2002 i386
Architecture: i386
Machine: i386
On one of my Linux systems using rcorder and rc.subr, the rc scripts
were ran again and again without stop.
Researching this I found it was doing "rc keygen" so /etc/rc
was starting again each time.
This is because security/openssh/files/
has "$0 keygen" and $0 was not set to /etc/rc.d/sshd.
I see that the real rc.d/sshd script Revision 1.16 gets rid of that
"Don't assume that $0 is this script."
The fix would be to check for rc.subr again and use
"run_rc_command keygen" instead.

Also, the check for /etc/rc.d directory can be removed
since it checks for a file in the directory after anyways.