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

Annotation of /rpms/smeserver-shared-folders/contribs8/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)
Sun Mar 3 22:04:40 2013 UTC (11 years, 9 months ago) by unnilennium
Branch: MAIN
CVS Tags: smeserver-shared-folders-0_1-80_el5_sme, smeserver-shared-folders-0_1-83_el5_sme, smeserver-shared-folders-0_1-84_el5_sme, smeserver-shared-folders-0_1-82_el5_sme, smeserver-shared-folders-0_1-87_el5_sme, smeserver-shared-folders-0_1-86_el5_sme, smeserver-shared-folders-0_1-81_el5_sme, smeserver-shared-folders-0_1-85_el5_sme, smeserver-shared-folders-0_1-79_el5_sme, HEAD
Initial import

1 unnilennium 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