Bug 164998

Summary: vsftpd doesn't daemonize correctly
Product: Red Hat Enterprise Linux 4 Reporter: Simon Perreault <nomis80>
Component: vsftpdAssignee: Radek Vokál <rvokal>
Status: CLOSED RAWHIDE QA Contact: Mike McLean <mikem>
Severity: low Docs Contact:
Priority: medium    
Version: 4.0   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 2.0.3-7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-08-04 09:12:58 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
Patch that makes vsftpd daemonize correctly none

Description Simon Perreault 2005-08-03 13:42:50 UTC
Here's a copy of the email I sent to chris.org: 
 
==================================================================== 
Subject: [PATCH] Proper daemonization of vsftpd 
From: Simon Perreault <nomis80>  (LQT Systems) 
To: chris.org 
Date: 2005-06-15 16:17 
    
Hi, 
 
I've found a bug in vsftpd when running in listen + background mode. This  
command never returns: 
 
vsftpd vsftpd.conf | cat 
 
The cause is that vsftpd doesn't daemonize correctly. It should reopen its  
standard file descriptors to /dev/null. See daemon(3). 
 
The attached patch fixes that problem. Please consider applying. 
 
Thanks! 
==================================================================== 
 
Some Red Hat-specific stuff: Now that vsftpd daemonizes correctly, it would be 
cleaner to use listen + background mode in the configuration file and use the 
daemon() function in the init script instead of starting vsftpd with an 
ampersand at the end of the line (yuck!).

Comment 1 Simon Perreault 2005-08-03 13:42:51 UTC
Created attachment 117402 [details]
Patch that makes vsftpd daemonize correctly

Comment 2 Radek Vokál 2005-08-04 09:12:58 UTC
Patch checked in. This is too big change for RHEL4 so the patch goes to rawhide.
Also vsftpd initscript got changed in previous release so the vsftpd is started
as daemon in background by default.

Comment 3 Milan Kerslager 2006-04-21 10:24:12 UTC
Using a daemon() function is a duplicate of the bug #158714.