Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 49670

Summary: sshd start-up leaves cruft in boot.log
Product: [Retired] Red Hat Raw Hide Reporter: Jonathan Kamens <h1k6zn2m>
Component: opensshAssignee: Nalin Dahyabhai <nalin>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 1.0   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2003-02-18 21:43:13 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Use "daemon" instead of "initlog" when starting sshd
none
Fix sshd start-up script boot log cruft without using daemon() none

Description Jonathan Kamens 2001-07-23 00:30:00 UTC
With openssh-server-2.9p2-3, this is what I see in /var/log/boot.log after
sshd starts on reboot:

Jul 22 15:42:55 jik sshd: Starting sshd:
Jul 22 15:42:57 jik sshd:  succeeded
Jul 22 15:42:57 jik sshd: ^[[60G[  
Jul 22 15:42:57 jik sshd: 
Jul 22 15:42:57 jik rc: Starting sshd:  succeeded

This is obviously not formatted correctly.  I believe that the correct fix
for this is to simply use "daemon" instead of using "initlog -c" directly
from the sshd start-up script.  I'll attach a patch to
/etc/rc.d/init.d/sshd.

Comment 1 Jonathan Kamens 2001-07-23 00:30:22 UTC
Created attachment 24547 [details]
Use "daemon" instead of "initlog" when starting sshd

Comment 2 Nalin Dahyabhai 2002-03-07 19:06:15 UTC
The daemon() function (in at least certain versions of initscripts, but not the
current version) refuses to start a daemon if it detects it already running, so
if you happen to be logged in via ssh when you try to start it up, it won't
happen unless you call initlog directly.  I'll make a note of this in the
changelog so that I don't forget why it was changed to use initlog in the
future.  Marking as won't fix for this reason (you are correct that daemon() is
generally the correct way to start daemons).

Comment 3 Jonathan Kamens 2002-03-08 15:50:14 UTC
OK, I am confused.  You seem to be saying that you can use daemon in the
start-up script in the current version of sshd but not in previous versions.  In
that case, why don't you just fix the bug in Raw Hide rather than marking it
WONTFIX?  Or perhaps mark it DEFERRED instead of WONTFIX?  In other words, I
don't understand why you would mark a but WONTFIX when you've acknowledged that
it should be fixed and *can* be fixed at some later date.

Furthermore, even when using versions of initscripts where daemon won't work in
this context, you can still fix this bug, i.e., get rid of the extra cruft in
the boot log.  I will attach another patch which shows how to do this.


Comment 4 Jonathan Kamens 2002-03-08 15:51:00 UTC
Created attachment 47900 [details]
Fix sshd start-up script boot log cruft without using daemon()

Comment 5 Bill Nottingham 2003-02-18 21:43:13 UTC
Different fix in initscripts-7.08-1.