/[smecontribs]/rpms/smeserver-shared-folders/contribs7/smeserver-shared-folders-0.1-webdav_support.patch
ViewVC logotype

Annotation of /rpms/smeserver-shared-folders/contribs7/smeserver-shared-folders-0.1-webdav_support.patch

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


Revision 1.1 - (hide annotations) (download)
Fri Nov 26 13:48:24 2010 UTC (14 years ago) by vip-ire
Branch: MAIN
CVS Tags: smeserver-shared-folders-0_1-28_el4_sme, smeserver-shared-folders-0_1-43_el4_sme, smeserver-shared-folders-0_1-39_el4_sme, smeserver-shared-folders-0_1-40_el4_sme, smeserver-shared-folders-0_1-71_el4_sme, smeserver-shared-folders-0_1-61_el4_sme, smeserver-shared-folders-0_1-70_el4_sme, smeserver-shared-folders-0_1-66_el4_sme, smeserver-shared-folders-0_1-65_el4_sme, smeserver-shared-folders-0_1-51_el4_sme, smeserver-shared-folders-0_1-50_el4_sme, smeserver-shared-folders-0_1-59_el4_sme, smeserver-shared-folders-0_1-48_el4_sme, smeserver-shared-folders-0_1-56_el4_sme, smeserver-shared-folders-0_1-35_el4_sme, smeserver-shared-folders-0_1-37_el4_sme, smeserver-shared-folders-0_1-42_el4_sme, smeserver-shared-folders-0_1-60_el4_sme, smeserver-shared-folders-0_1-47_el4_sme, smeserver-shared-folders-0_1-77_el4_sme, smeserver-shared-folders-0_1-32_el4_sme, smeserver-shared-folders-0_1-74_el4_sme, smeserver-shared-folders-0_1-26_el4_sme, smeserver-shared-folders-0_1-78_el4_sme, smeserver-shared-folders-0_1-30_el4_sme, smeserver-shared-folders-0_1-41_el4_sme, smeserver-shared-folders-0_1-31_el4_sme, smeserver-shared-folders-0_1-34_el4_sme, smeserver-shared-folders-0_1-62_el4_sme, smeserver-shared-folders-0_1-58_el4_sme, smeserver-shared-folders-0_1-63_el4_sme, smeserver-shared-folders-0_1-75_el4_sme, smeserver-shared-folders-0_1-76_el4_sme, smeserver-shared-folders-0_1-68_el4_sme, smeserver-shared-folders-0_1-69_el4_sme, smeserver-shared-folders-0_1-57_el4_sme, smeserver-shared-folders-0_1-54_el4_sme, smeserver-shared-folders-0_1-49_el4_sme, smeserver-shared-folders-0_1-46_el4_sme, smeserver-shared-folders-0_1-33_el4_sme, smeserver-shared-folders-0_1-44_el4_sme, smeserver-shared-folders-0_1-45_el4_sme, smeserver-shared-folders-0_1-52_el4_sme, smeserver-shared-folders-0_1-29_el4_sme, smeserver-shared-folders-0_1-72_el4_sme, smeserver-shared-folders-0_1-73_el4_sme, smeserver-shared-folders-0_1-38_el4_sme, smeserver-shared-folders-0_1-64_el4_sme, smeserver-shared-folders-0_1-36_el4_sme, smeserver-shared-folders-0_1-67_el4_sme, smeserver-shared-folders-0_1-79_el4_sme, smeserver-shared-folders-0_1-55_el4_sme, smeserver-shared-folders-0_1-27_el4_sme, smeserver-shared-folders-0_1-53_el4_sme, HEAD
* Wed Nov 26 2010 Daniel B. <daniel@firewall-services.com> 0.1-26.sme
- Add webdav support
- add recycle purge support (with configurable retention time)

1 vip-ire 1.1 diff -Nur -x '*.orig' -x '*.rej' smeserver-shared-folders-0.1/root/etc/e-smith/locale/en-us/etc/e-smith/web/functions/shares mezzanine_patched_smeserver-shared-folders-0.1/root/etc/e-smith/locale/en-us/etc/e-smith/web/functions/shares
2     --- smeserver-shared-folders-0.1/root/etc/e-smith/locale/en-us/etc/e-smith/web/functions/shares 2010-11-26 12:19:35.000000000 +0100
3     +++ mezzanine_patched_smeserver-shared-folders-0.1/root/etc/e-smith/locale/en-us/etc/e-smith/web/functions/shares 2010-11-26 12:19:33.000000000 +0100
4     @@ -195,6 +195,13 @@
5     </entry>
6    
7     <entry>
8     + <base>LABEL_WEBDAV</base>
9     + <trans>
10     + WebDav support
11     + </trans>
12     + </entry>
13     +
14     + <entry>
15     <base>LABEL_REQUIRE_SSL</base>
16     <trans>
17     Force secure connections
18     diff -Nur -x '*.orig' -x '*.rej' smeserver-shared-folders-0.1/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/90e-smithAccess50shares mezzanine_patched_smeserver-shared-folders-0.1/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/90e-smithAccess50shares
19     --- smeserver-shared-folders-0.1/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/90e-smithAccess50shares 2010-11-26 12:19:35.000000000 +0100
20     +++ mezzanine_patched_smeserver-shared-folders-0.1/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/90e-smithAccess50shares 2010-11-26 12:14:07.000000000 +0100
21     @@ -14,6 +14,7 @@
22     my $allow;
23     my $pass;
24     my $satisfy;
25     + my $webdav = ($properties{'WebDav'} =~ m/^(enabled|on|yes)$/i) ? 1 : 0;
26    
27     # Find which users has at least read access
28     my @users = ('admin');
29     @@ -23,7 +24,7 @@
30     foreach my $group (@groups) {
31     my $members = $adb->get_prop($group, 'Members') || "";
32     if (length($members) > 0) {
33     - push @users, split (/[;,]/, $members);
34     + push @writers, split (/[;,]/, $members);
35     }
36     }
37    
38     @@ -34,16 +35,17 @@
39     foreach my $group (@groups) {
40     my $members = $adb->get_prop($group, 'Members') || "";
41     if (length($members) > 0) {
42     - push @users, split (/[;,]/, $members);
43     + push @readers, split (/[;,]/, $members);
44     }
45     }
46    
47     }
48    
49     my %seen = ();
50     - my @unique = sort (grep { ! $seen{ $_ }++ } @users);
51     + my @readers = sort (grep { ! $seen{ $_ }++ } (@readers,@writers));
52    
53     - my $users = join(" ", @unique) || '';
54     + my $readers = join(" ", @readers) || '';
55     + my $writers = join(" ", @writers) || '';
56    
57     if ($properties{'httpAccess'})
58     {
59     @@ -52,6 +54,7 @@
60     $allow = "$localAccess $externalSSLAccess";
61     $pass = 0;
62     $satisfy = 'all';
63     + $webdav = 0;
64     }
65     elsif ($properties{'httpAccess'} eq 'local-pw')
66     {
67     @@ -64,6 +67,7 @@
68     $allow = 'all';
69     $pass = 0;
70     $satisfy = 'all';
71     + $webdav = 0;
72     }
73     elsif ($properties{'httpAccess'} eq 'global-pw')
74     {
75     @@ -76,6 +80,7 @@
76     $allow = "$localAccess $externalSSLAccess";
77     $pass = 1;
78     $satisfy = 'any';
79     + $webdav = 0;
80     }
81     else{
82     next;
83     @@ -132,10 +137,24 @@
84     $OUT .= " AuthName \"$properties{'Name'}\"\n";
85     $OUT .= " AuthType Basic\n";
86     $OUT .= " AuthExternal pwauth\n";
87     - $OUT .= " require user $users\n";
88     + $OUT .= " require user $readers\n" unless ($webdav);
89     $OUT .= " Satisfy $satisfy\n";
90     }
91     + # WebDav is enabled only when auth is required
92     + if ($webdav)
93     + {
94     + $OUT .=<<"HERE";
95     +
96     + Dav on
97     + <Limit GET PROPFIND OPTIONS LOCK UNLOCK>
98     + Require user $readers
99     + </Limit>
100     + <LimitExcept GET PROPFIND OPTIONS LOCK UNLOCK>
101     + Require user $writers
102     + </LimitExcept>
103    
104     +HERE
105     + }
106     $OUT .= "</Directory>\n";
107     if ($dynamicContent eq 'enabled'){
108     $OUT .= "<DirectoryMatch /home/e-smith/files/shares/$key/files/cgi-bin>\n";
109     diff -Nur -x '*.orig' -x '*.rej' smeserver-shared-folders-0.1/root/etc/e-smith/web/functions/shares mezzanine_patched_smeserver-shared-folders-0.1/root/etc/e-smith/web/functions/shares
110     --- smeserver-shared-folders-0.1/root/etc/e-smith/web/functions/shares 2010-11-26 12:19:35.000000000 +0100
111     +++ mezzanine_patched_smeserver-shared-folders-0.1/root/etc/e-smith/web/functions/shares 2010-11-26 12:15:09.000000000 +0100
112     @@ -92,6 +92,10 @@
113     <label>LABEL_HTTP_ACCESS</label>
114     </field>
115    
116     + <field type="select" id="webdav" options="'enabled' => 'ENABLED', 'disabled' => 'DISABLED'">
117     + <label>LABEL_WEBDAV</label>
118     + </field>
119     +
120     <field type="select" id="requireSSL"
121     options="'enabled' => 'ENABLED', 'disabled' => 'DISABLED'">
122     <label>LABEL_REQUIRE_SSL</label>
123     diff -Nur -x '*.orig' -x '*.rej' smeserver-shared-folders-0.1/root/usr/lib/perl5/site_perl/esmith/FormMagick/Panel/shares.pm mezzanine_patched_smeserver-shared-folders-0.1/root/usr/lib/perl5/site_perl/esmith/FormMagick/Panel/shares.pm
124     --- smeserver-shared-folders-0.1/root/usr/lib/perl5/site_perl/esmith/FormMagick/Panel/shares.pm 2010-11-26 12:19:35.000000000 +0100
125     +++ mezzanine_patched_smeserver-shared-folders-0.1/root/usr/lib/perl5/site_perl/esmith/FormMagick/Panel/shares.pm 2010-11-26 12:17:48.000000000 +0100
126     @@ -178,6 +178,7 @@
127     $q->param(-name=>'smbaccess',-value=>'browseable');
128     $q->param(-name=>'recyclebin',-value=>'disabled');
129     $q->param(-name=>'httpaccess',-value=>'none');
130     + $q->param(-name=>'webdav',-value=>'disabled');
131     $q->param(-name=>'requireSSL',-value=>'disabled');
132     $q->param(-name=>'indexes',-value=>'disabled');
133     $q->param(-name=>'dynamic',-value=>'disabled');
134     @@ -212,6 +213,8 @@
135     ($rec->prop('RecycleBin') || 'disabled'));
136     $q->param(-name=>'httpaccess',-value=>
137     ($rec->prop('httpAccess') || 'none'));
138     + $q->param(-name=>'webdav',-value=>
139     + ($rec->prop('WebDav') || 'disabled'));
140     $q->param(-name=>'requireSSL',-value=>
141     ($rec->prop('RequireSSL') || 'enabled'));
142     $q->param(-name=>'indexes',-value=>
143     @@ -460,6 +463,7 @@
144     RecycleBin => $self->cgi->param('recyclebin'),
145     smbAccess => $self->cgi->param('smbaccess'),
146     httpAccess => $self->cgi->param('httpaccess'),
147     + WebDav => $self->cgi->param('webdav'),
148     RequireSSL => $self->cgi->param('requireSSL'),
149     Indexes => $self->cgi->param('indexes'),
150     DynamicContent => $self->cgi->param('dynamic'),
151     @@ -507,6 +511,7 @@
152     RecycleBin => $self->cgi->param('recyclebin'),
153     smbAccess => $self->cgi->param('smbaccess'),
154     httpAccess => $self->cgi->param('httpaccess'),
155     + WebDav => $self->cgi->param('webdav'),
156     RequireSSL => $self->cgi->param('requireSSL'),
157     Indexes => $self->cgi->param('indexes'),
158     DynamicContent => $self->cgi->param('dynamic'),

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