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

Clone Of:
Last Closed: 2005-08-04 09:12:58 UTC

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