/[smeserver]/rpms/e-smith-proftpd/sme8/e-smith-proftpd-2.2.0-LongLine.patch
ViewVC logotype

Annotation of /rpms/e-smith-proftpd/sme8/e-smith-proftpd-2.2.0-LongLine.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (hide annotations) (download)
Thu Jan 24 01:27:42 2013 UTC (11 years, 9 months ago) by wellsi
Branch: MAIN
CVS Tags: e-smith-proftpd-2_2_0-5_el5_sme, e-smith-proftpd-2_2_0-6_el5_sme, HEAD
handle long lines correctly in the configuration file

1 wellsi 1.1 diff -ruN e-smith-proftpd-2.2.0.old/root/etc/e-smith/templates/etc/proftpd.conf/00localAccess e-smith-proftpd-2.2.0/root/etc/e-smith/templates/etc/proftpd.conf/00localAccess
2     --- e-smith-proftpd-2.2.0.old/root/etc/e-smith/templates/etc/proftpd.conf/00localAccess 2006-03-17 00:09:50.000000000 +0000
3     +++ e-smith-proftpd-2.2.0/root/etc/e-smith/templates/etc/proftpd.conf/00localAccess 2013-01-24 01:12:35.000000000 +0000
4     @@ -1,17 +1,9 @@
5     {
6     # Work out local access specification
7     use esmith::NetworksDB;
8     - use Net::IPv4Addr qw(ipv4_parse);
9    
10     my $ndb = esmith::NetworksDB->open_ro();
11     - my @local_access = $ndb->local_access_spec;
12     - my @cidr_access = ();
13     - foreach my $part (@local_access)
14     - {
15     - my $cidr = join '/', ipv4_parse($part);
16     - push @cidr_access, $cidr;
17     - }
18     - $localAccess = join(', ', @cidr_access);
19     + @local_access = $ndb->local_access_spec;
20    
21     return "";
22     }
23     diff -ruN e-smith-proftpd-2.2.0.old/root/etc/e-smith/templates/etc/proftpd.conf/15LimitLOGIN e-smith-proftpd-2.2.0/root/etc/e-smith/templates/etc/proftpd.conf/15LimitLOGIN
24     --- e-smith-proftpd-2.2.0.old/root/etc/e-smith/templates/etc/proftpd.conf/15LimitLOGIN 2003-03-13 20:06:04.000000000 +0000
25     +++ e-smith-proftpd-2.2.0/root/etc/e-smith/templates/etc/proftpd.conf/15LimitLOGIN 2013-01-24 01:12:42.000000000 +0000
26     @@ -4,11 +4,19 @@
27     }<Limit LOGIN>
28     {
29     my $access = $ftp{LoginAccess} || "private";
30     - $OUT = ($access eq 'public') ?
31     - " AllowAll"
32     - :
33     - " Order Allow,Deny\n" .
34     - " Allow from $localAccess\n" .
35     - " Deny from all";
36     + if ($access eq 'public')
37     + {
38     + $OUT = " AllowAll";
39     + }
40     + else
41     + {
42     + use Net::IPv4Addr qw(ipv4_parse);
43     +
44     + $OUT = " Order Allow,Deny\n";
45     + $OUT .= join "\n",
46     + map { " Allow from " . join '/', ipv4_parse($_) }
47     + @local_access;
48     + $OUT .= " Deny from all";
49     + }
50     }
51     </Limit>
52     diff -ruN e-smith-proftpd-2.2.0.old/root/etc/e-smith/templates/etc/proftpd.conf/60AnonymousIBay e-smith-proftpd-2.2.0/root/etc/e-smith/templates/etc/proftpd.conf/60AnonymousIBay
53     --- e-smith-proftpd-2.2.0.old/root/etc/e-smith/templates/etc/proftpd.conf/60AnonymousIBay 2008-10-07 18:36:59.000000000 +0100
54     +++ e-smith-proftpd-2.2.0/root/etc/e-smith/templates/etc/proftpd.conf/60AnonymousIBay 2013-01-24 01:12:46.000000000 +0000
55     @@ -5,10 +5,13 @@
56     #------------------------------------------------------------
57    
58     use esmith::AccountsDB;
59     + use Net::IPv4Addr qw(ipv4_parse);
60    
61     $OUT .= "";
62    
63     my $adb = esmith::AccountsDB->open_ro();
64     + my @local = map { join '/', ipv4_parse($_) } @local_access;
65     + my @all = ('all');
66     foreach my $ibay ($adb->ibays)
67     {
68     my $key = $ibay->key;
69     @@ -16,39 +19,38 @@
70    
71     next if ($key eq "Primary");
72    
73     - my $allow;
74     my $pass;
75    
76     my $access = $ibay->prop('PublicAccess') || 'none';
77    
78     if ($access eq 'none')
79     {
80     - $allow = '127.0.0.1';
81     + @allow = ('127.0.0.1');
82     $pass = 1;
83     }
84     elsif ($access eq 'local')
85     {
86     - $allow = $localAccess;
87     + @allow = @local;
88     $pass = 0;
89     }
90     elsif ($access eq 'local-pw')
91     {
92     - $allow = $localAccess;
93     + @allow = @local;
94     $pass = 1;
95     }
96     elsif ($access eq 'global')
97     {
98     - $allow = 'all';
99     + @allow = @all;
100     $pass = 0;
101     }
102     elsif ($access eq 'global-pw')
103     {
104     - $allow = 'all';
105     + @allow = @all;
106     $pass = 1;
107     }
108     elsif ($access eq 'global-pw-remote')
109     {
110     - $allow = 'all';
111     + @allow = @all;
112     $pass = 1;
113     }
114    
115     @@ -68,7 +70,7 @@
116     $OUT .= " DisplayChdir .message\n";
117     $OUT .= " <Limit LOGIN>\n";
118     $OUT .= " Order Allow,Deny\n";
119     - $OUT .= " Allow from $allow\n";
120     + $OUT .= " Allow from $_\n" foreach @allow;
121     $OUT .= " Deny from all\n";
122     $OUT .= " </Limit>\n";
123     $OUT .= " <Directory *>\n";

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed