Bug 164998 - vsftpd doesn't daemonize correctly
Summary: vsftpd doesn't daemonize correctly
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: vsftpd (Show other bugs)
(Show other bugs)
Version: 4.0
Hardware: All Linux
medium
low
Target Milestone: ---
: ---
Assignee: Radek Vokal
QA Contact: Mike McLean
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-08-03 13:42 UTC by Simon Perreault
Modified: 2007-11-30 22:07 UTC (History)
0 users

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: ---


Attachments (Terms of Use)
Patch that makes vsftpd daemonize correctly (2.14 KB, patch)
2005-08-03 13:42 UTC, Simon Perreault
no flags Details | Diff

Description Simon Perreault 2005-08-03 13:42:50 UTC
Here's a copy of the email I sent to chris@scary.beasts.org: 
 
==================================================================== 
Subject: [PATCH] Proper daemonization of vsftpd 
From: Simon Perreault <nomis80@lqt.ca>  (LQT Systems) 
To: chris@scary.beasts.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 Vokal 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.


Note You need to log in before you can comment on or make changes to this bug.