3 # Finds all per-directory options files under the all the document roots
5 require './proftpd-lib.pl';
7 @rv = grep { -r $_ } @ftpaccess_files;
8 &error_setup($text{'find_err'});
11 # Look under the given directory
12 @dirs = ( $in{'dir'} );
15 # Look in Anonymous sections
16 $conf = &get_config();
17 $anon = &find_directive("Anonymous", $conf);
18 push(@dirs, $anon) if ($anon);
19 foreach $v (&find_directive_struct("VirtualHost", $conf)) {
20 $anon = &find_directive("Anonymous", $v->{'members'});
21 push(@dirs, $anon) if ($anon);
23 &error($text{'find_eanon'}) if (!@dirs);
27 if ($d =~ /^~(\S+)$/) {
28 local @u = getpwnam($1);
32 open(FIND, "find '$d' -name .ftpaccess -print |");
41 $site{'ftpaccess'} = join(' ', &unique(@rv));
42 &write_file("$module_config_directory/site", \%site);
43 &redirect("ftpaccess.cgi");