Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 97140 - vsftpd and virtual hosts init script patch
Summary: vsftpd and virtual hosts init script patch
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All All
: High normal (vote)
Assignee: Roy Marples (RETIRED)
URL:
Whiteboard:
Keywords: Inclusion
Depends on:
Blocks: 81819
  Show dependency tree
 
Reported: 2005-06-26 13:20 UTC by parafin
Modified: 2005-10-20 02:51 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
new vsftpd init script (vsftpd,1.00 KB, text/plain)
2005-06-26 13:21 UTC, parafin
Details
default conf.d file (vsftpd,322 bytes, text/plain)
2005-06-26 13:21 UTC, parafin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description parafin 2005-06-26 13:20:14 UTC
I have patched init script of net-ftp/vsftpd-1.2.2 to make it support virtual 
hosts. The problem with existent script, that if you create link vsftpd.eth1 -> 
vsftpd  in init.d and new configuration file in conf.d with different config 
file, it would work... until you try to stop one of them. killall vsftpd will do 
it's work and kill both of daemons.

Reproducible: Always
Steps to Reproduce:
1.create 2 configs with different listen_address - /etc/vsftpd/vsftpd.conf and /
etc/vsftpd.eth1.conf
2.ln -s /etc/init.d/vsftpd /etc/init.d/vsftpd.eth1
3.echo VSFTPD_CONF=/etc/vsftpd/vsftpd.eth1.conf >/etc/conf.d/vsftpd.eth1
4.start both and stop one of them
5.ps aux|grep vsftpd - oh no, we killed second daemon too :(
Comment 1 parafin 2005-06-26 13:21:18 UTC
Created attachment 62001 [details]
new vsftpd init script
Comment 2 parafin 2005-06-26 13:21:52 UTC
Created attachment 62002 [details]
default conf.d file
Comment 3 Roy Marples (RETIRED) gentoo-dev 2005-06-27 05:03:43 UTC
While I have no issue with the changes is there any reason why you cannot use
tcpwrappers to enable virtual hosts via vsftp?

Here's my line from /etc/hosts.allow

vsftpd@192.168.2.3: ALL: setenv VSFTPD_LOAD_CONF /etc/vsftpd/vhost.conf

This applies the options in vhost.conf to the main config - all settings can be
turned on or off.
Comment 4 parafin 2005-06-27 07:29:43 UTC
Yes, it is another way to do it, but you must have tcpwrappers in USE flags to 
do it in this manner. And the most important - "Gentoo is all about choice" ;) 
It's better when there are more than one way to done smth. I like more my 
variant and will be happy if my favourite distro support it.
Comment 5 Roy Marples (RETIRED) gentoo-dev 2005-06-27 09:13:03 UTC
OK - we cannot use this until we get baselayout-1.12.x stable due to bug #81819

And that won't happen for a while I'm afraid :/
Comment 6 parafin 2005-06-27 09:26:33 UTC
Why not require BACKGROUND=NO in config, how i made it? It would i think resolve 
 that bug... And what's about new baselayout? i haven't catched the connection.
Comment 7 Roy Marples (RETIRED) gentoo-dev 2005-06-27 09:33:04 UTC
No, the problem in bug #81819 is that any child processes spawned are not killed
when we ask vsftpd to stop - hence using the killall statement as workaround.

baselayout-1.12.x overrides the start-stop-daemon command so that all child
processes are infact killed correctly.
Comment 8 Roy Marples (RETIRED) gentoo-dev 2005-10-20 02:51:28 UTC
Fixed in vsftpd-2.0.3-r2