/[smeserver]/rpms/e-smith-ibays/sme9/e-smith-ibays-2.4.0-90e-smithAccess40ibays-whitespace.patch
ViewVC logotype

Contents of /rpms/e-smith-ibays/sme9/e-smith-ibays-2.4.0-90e-smithAccess40ibays-whitespace.patch

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


Revision 1.1 - (show annotations) (download)
Fri Jan 3 04:41:14 2014 UTC (10 years, 4 months ago) by wellsi
Branch: MAIN
CVS Tags: e-smith-ibays-2_4_0-7_el6_sme, e-smith-ibays-2_4_0-14_el6_sme, e-smith-ibays-2_4_0-12_el6_sme, e-smith-ibays-2_4_0-13_el6_sme, e-smith-ibays-2_4_0-11_el6_sme, e-smith-ibays-2_4_0-6_el6_sme, e-smith-ibays-2_4_0-8_el6_sme, HEAD
* Thu Jan 2 2014 Ian Wells <esmith@wellsi.com> 2.4.0-6.sme
- Provide the ability to restrict ibay access to https, by JPP [SME: 882]
- Remove old migrate fragment [SME: 8080]
- Whitespace cleanup, mainly tab removal, of 90e-smithAccess40ibays

1 diff -ruN e-smith-ibays-2.4.0.old/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/90e-smithAccess40ibays e-smith-ibays-2.4.0/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/90e-smithAccess40ibays
2 --- e-smith-ibays-2.4.0.old/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/90e-smithAccess40ibays 2013-12-21 16:49:58.000000000 -0800
3 +++ e-smith-ibays-2.4.0/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/90e-smithAccess40ibays 2013-12-21 16:55:09.000000000 -0800
4 @@ -8,170 +8,169 @@
5 $OUT = "";
6 foreach my $ibay ($adb->ibays)
7 {
8 - my %properties = $ibay->props;
9 - my $key = $ibay->key;
10 - #------------------------------------------------------------
11 - # Figure out which combination of parameters to use. If
12 - # PublicAccess parameter is present, this is e-smith 4.0.
13 - # Otherwise, it's e-smith 3.0.
14 - #------------------------------------------------------------
15 -
16 - my $allow;
17 - my $pass;
18 - my $satisfy;
19 -
20 - if ($properties{'PublicAccess'})
21 - {
22 - if ($properties{'PublicAccess'} eq 'none')
23 - {
24 - next;
25 - }
26 - elsif ($properties{'PublicAccess'} eq 'local')
27 - {
28 - $allow = $localAccess;
29 - $pass = 0;
30 - $satisfy = 'all';
31 - }
32 - elsif ($properties{'PublicAccess'} eq 'local-pw')
33 - {
34 - $allow = $localAccess;
35 - $pass = 1;
36 - $satisfy = 'all';
37 - }
38 - elsif ($properties{'PublicAccess'} eq 'global')
39 - {
40 - $allow = 'all';
41 - $pass = 0;
42 - $satisfy = 'all';
43 - }
44 - elsif ($properties{'PublicAccess'} eq 'global-pw')
45 - {
46 - $allow = 'all';
47 - $pass = 1;
48 - $satisfy = 'all';
49 - }
50 - elsif ($properties{'PublicAccess'} eq 'global-pw-remote')
51 - {
52 - $allow = $localAccess;
53 - $pass = 1;
54 - $satisfy = 'any';
55 - }
56 - }
57 - elsif ($properties {'ReadAccess'} eq 'global')
58 - {
59 - if ($properties {'UsePassword'} eq 'yes')
60 - {
61 - $allow = 'all';
62 - $pass = 1;
63 - $satisfy = 'all';
64 - }
65 - else
66 - {
67 - $allow = 'all';
68 - $pass = 0;
69 - $satisfy = 'all';
70 - }
71 - }
72 - else
73 - {
74 - if ($properties {'UsePassword'} eq 'yes')
75 - {
76 - $allow = $localAccess;
77 - $pass = 1;
78 - $satisfy = 'all';
79 - }
80 - else
81 - {
82 - $allow = $localAccess;
83 - $pass = 0;
84 - $satisfy = 'all';
85 - }
86 - }
87 -
88 -
89 - my $allowOverride = $properties{'AllowOverride'} || "None";
90 - my $dynamicContent = $properties{'CgiBin'} || "disabled";
91 - my $followSymLinks = $properties{'FollowSymLinks'} || "disabled";
92 - my $indexes = $properties{'Indexes'} || "enabled";
93 - $OUT .= "\n";
94 - $OUT .= "#------------------------------------------------------------\n";
95 - $OUT .= "# $key ibay directories ($properties{'Name'})\n";
96 - $OUT .= "#------------------------------------------------------------\n";
97 -
98 - $OUT .= "\n";
99 - $OUT .= "<Directory /home/e-smith/files/ibays/$key/html>\n";
100 - $OUT .= " Options None\n";
101 - $OUT .= " Options +Indexes\n" if ($indexes eq 'enabled');
102 - $OUT .= " Options +FollowSymLinks\n" if ($followSymLinks eq 'enabled');
103 - if ($dynamicContent eq 'enabled')
104 - {
105 - $OUT .= " Options +Includes\n";
106 - }
107 - else
108 - {
109 - $OUT .= " DirectoryIndex index.shtml index.htm index.html\n";
110 - $OUT .= " Options +IncludesNOEXEC\n";
111 - $OUT .= " <FilesMatch \"\\.(php|php3|phtml)\$\">\n";
112 - $OUT .= " order deny,allow\n";
113 - $OUT .= " Deny from all\n";
114 - $OUT .= " </FilesMatch>\n";
115 - }
116 - $OUT .= " AllowOverride $allowOverride\n";
117 - $OUT .= " order deny,allow\n";
118 - $OUT .= " deny from all\n";
119 - $OUT .= " allow from $allow\n";
120 - if ($pass)
121 - {
122 - $OUT .= " AuthName \"$properties{'Name'}\"\n";
123 - $OUT .= " AuthType Basic\n";
124 - $OUT .= " AuthBasicProvider external\n";
125 - $OUT .= " AuthExternal pwauth\n";
126 - $OUT .= " require user $key\n";
127 - $OUT .= " Satisfy $satisfy\n";
128 - }
129 -
130 - if (($properties{PHPRegisterGlobals} || 'disabled') eq 'enabled')
131 - {
132 - $OUT .= " php_flag register_globals on\n";
133 - }
134 - $OUT .= "</Directory>\n";
135 -
136 - $OUT .= "\n";
137 - $OUT .= "<Directory /home/e-smith/files/ibays/$key/cgi-bin>\n";
138 - if ($dynamicContent eq 'enabled')
139 - {
140 - $OUT .= " Options ExecCGI\n";
141 - }
142 - $OUT .= " AllowOverride None\n";
143 - $OUT .= " order deny,allow\n";
144 - $OUT .= " deny from all\n";
145 - $OUT .= " allow from $allow\n";
146 - if ($pass)
147 - {
148 - $OUT .= " AuthName \"$properties{'Name'}\"\n";
149 - $OUT .= " AuthType Basic\n";
150 - $OUT .= " AuthBasicProvider external\n";
151 - $OUT .= " AuthExternal pwauth\n";
152 - $OUT .= " require user $key\n";
153 - $OUT .= " Satisfy $satisfy\n";
154 - }
155 - $OUT .= "</Directory>\n";
156 -
157 - $OUT .= "\n";
158 - $OUT .= "<Directory /home/e-smith/files/ibays/$key/files>\n";
159 - $OUT .= " AllowOverride None\n";
160 - $OUT .= " order deny,allow\n";
161 - $OUT .= " deny from all\n";
162 - $OUT .= " allow from $allow\n";
163 - if ($pass)
164 - {
165 - $OUT .= " AuthName \"$properties{'Name'}\"\n";
166 - $OUT .= " AuthType Basic\n";
167 - $OUT .= " AuthBasicProvider external\n";
168 - $OUT .= " AuthExternal pwauth\n";
169 - $OUT .= " require user $key\n";
170 - $OUT .= " Satisfy $satisfy\n";
171 - }
172 - $OUT .= "</Directory>\n";
173 + my %properties = $ibay->props;
174 + my $key = $ibay->key;
175 + #------------------------------------------------------------
176 + # Figure out which combination of parameters to use. If
177 + # PublicAccess parameter is present, this is e-smith 4.0.
178 + # Otherwise, it's e-smith 3.0.
179 + #------------------------------------------------------------
180 +
181 + my $allow;
182 + my $pass;
183 + my $satisfy;
184 +
185 + if ($properties{'PublicAccess'})
186 + {
187 + if ($properties{'PublicAccess'} eq 'none')
188 + {
189 + next;
190 + }
191 + elsif ($properties{'PublicAccess'} eq 'local')
192 + {
193 + $allow = $localAccess;
194 + $pass = 0;
195 + $satisfy = 'all';
196 + }
197 + elsif ($properties{'PublicAccess'} eq 'local-pw')
198 + {
199 + $allow = $localAccess;
200 + $pass = 1;
201 + $satisfy = 'all';
202 + }
203 + elsif ($properties{'PublicAccess'} eq 'global')
204 + {
205 + $allow = 'all';
206 + $pass = 0;
207 + $satisfy = 'all';
208 + }
209 + elsif ($properties{'PublicAccess'} eq 'global-pw')
210 + {
211 + $allow = 'all';
212 + $pass = 1;
213 + $satisfy = 'all';
214 + }
215 + elsif ($properties{'PublicAccess'} eq 'global-pw-remote')
216 + {
217 + $allow = $localAccess;
218 + $pass = 1;
219 + $satisfy = 'any';
220 + }
221 + }
222 + elsif ($properties {'ReadAccess'} eq 'global')
223 + {
224 + if ($properties {'UsePassword'} eq 'yes')
225 + {
226 + $allow = 'all';
227 + $pass = 1;
228 + $satisfy = 'all';
229 + }
230 + else
231 + {
232 + $allow = 'all';
233 + $pass = 0;
234 + $satisfy = 'all';
235 + }
236 + }
237 + else
238 + {
239 + if ($properties {'UsePassword'} eq 'yes')
240 + {
241 + $allow = $localAccess;
242 + $pass = 1;
243 + $satisfy = 'all';
244 + }
245 + else
246 + {
247 + $allow = $localAccess;
248 + $pass = 0;
249 + $satisfy = 'all';
250 + }
251 + }
252 +
253 + my $allowOverride = $properties{'AllowOverride'} || "None";
254 + my $dynamicContent = $properties{'CgiBin'} || "disabled";
255 + my $followSymLinks = $properties{'FollowSymLinks'} || "disabled";
256 + my $indexes = $properties{'Indexes'} || "enabled";
257 + $OUT .= "\n";
258 + $OUT .= "#------------------------------------------------------------\n";
259 + $OUT .= "# $key ibay directories ($properties{'Name'})\n";
260 + $OUT .= "#------------------------------------------------------------\n";
261 +
262 + $OUT .= "\n";
263 + $OUT .= "<Directory /home/e-smith/files/ibays/$key/html>\n";
264 + $OUT .= " Options None\n";
265 + $OUT .= " Options +Indexes\n" if ($indexes eq 'enabled');
266 + $OUT .= " Options +FollowSymLinks\n" if ($followSymLinks eq 'enabled');
267 + if ($dynamicContent eq 'enabled')
268 + {
269 + $OUT .= " Options +Includes\n";
270 + }
271 + else
272 + {
273 + $OUT .= " DirectoryIndex index.shtml index.htm index.html\n";
274 + $OUT .= " Options +IncludesNOEXEC\n";
275 + $OUT .= " <FilesMatch \"\\.(php|php3|phtml)\$\">\n";
276 + $OUT .= " order deny,allow\n";
277 + $OUT .= " Deny from all\n";
278 + $OUT .= " </FilesMatch>\n";
279 + }
280 + $OUT .= " AllowOverride $allowOverride\n";
281 + $OUT .= " order deny,allow\n";
282 + $OUT .= " deny from all\n";
283 + $OUT .= " allow from $allow\n";
284 + if ($pass)
285 + {
286 + $OUT .= " AuthName \"$properties{'Name'}\"\n";
287 + $OUT .= " AuthType Basic\n";
288 + $OUT .= " AuthBasicProvider external\n";
289 + $OUT .= " AuthExternal pwauth\n";
290 + $OUT .= " require user $key\n";
291 + $OUT .= " Satisfy $satisfy\n";
292 + }
293 +
294 + if (($properties{PHPRegisterGlobals} || 'disabled') eq 'enabled')
295 + {
296 + $OUT .= " php_flag register_globals on\n";
297 + }
298 + $OUT .= "</Directory>\n";
299 +
300 + $OUT .= "\n";
301 + $OUT .= "<Directory /home/e-smith/files/ibays/$key/cgi-bin>\n";
302 + if ($dynamicContent eq 'enabled')
303 + {
304 + $OUT .= " Options ExecCGI\n";
305 + }
306 + $OUT .= " AllowOverride None\n";
307 + $OUT .= " order deny,allow\n";
308 + $OUT .= " deny from all\n";
309 + $OUT .= " allow from $allow\n";
310 + if ($pass)
311 + {
312 + $OUT .= " AuthName \"$properties{'Name'}\"\n";
313 + $OUT .= " AuthType Basic\n";
314 + $OUT .= " AuthBasicProvider external\n";
315 + $OUT .= " AuthExternal pwauth\n";
316 + $OUT .= " require user $key\n";
317 + $OUT .= " Satisfy $satisfy\n";
318 + }
319 + $OUT .= "</Directory>\n";
320 +
321 + $OUT .= "\n";
322 + $OUT .= "<Directory /home/e-smith/files/ibays/$key/files>\n";
323 + $OUT .= " AllowOverride None\n";
324 + $OUT .= " order deny,allow\n";
325 + $OUT .= " deny from all\n";
326 + $OUT .= " allow from $allow\n";
327 + if ($pass)
328 + {
329 + $OUT .= " AuthName \"$properties{'Name'}\"\n";
330 + $OUT .= " AuthType Basic\n";
331 + $OUT .= " AuthBasicProvider external\n";
332 + $OUT .= " AuthExternal pwauth\n";
333 + $OUT .= " require user $key\n";
334 + $OUT .= " Satisfy $satisfy\n";
335 + }
336 + $OUT .= "</Directory>\n";
337 }
338 }

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