--- rpms/smeserver-shared-folders/contribs10/smeserver-shared-folders-0.3-bz12060-httpd24.patch 2022/07/25 06:53:11 1.1
+++ rpms/smeserver-shared-folders/contribs10/smeserver-shared-folders-0.3-bz12060-httpd24.patch 2022/08/01 04:17:50 1.2
@@ -175,3 +175,170 @@ diff -Nur --no-dereference smeserver-sha
$OUT .= "\n";
}
}
+diff -Nur --no-dereference smeserver-shared-folders-0.3.old/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/90e-smithAccess50shares smeserver-shared-folders-0.3/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/90e-smithAccess50shares
+--- smeserver-shared-folders-0.3.old/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/90e-smithAccess50shares 2022-08-01 00:04:59.295000000 -0400
++++ smeserver-shared-folders-0.3/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/90e-smithAccess50shares 2022-08-01 00:15:44.054000000 -0400
+@@ -13,11 +13,9 @@
+ my $allow;
+ my $allow24;
+ my $pass;
+- my $satisfy;
+ my $satisfy24begin;
+ my $satisfy24end;
+ my $davreaders;
+- my $davwallow = '';
+ my $davwallow24 = '';
+ my $webdav = (($properties{'WebDav'} || 'disabled') =~ m/^(enabled|on|yes)$/i) ? 1 : 0;
+
+@@ -68,48 +66,37 @@
+
+ if ($properties{'httpAccess'}) {
+ if ($properties{'httpAccess'} eq 'local') {
+- $allow = "$localAccess $externalSSLAccess";
+ $allow24 = "ip $localAccess $externalSSLAccess";
+ $pass = 0;
+- $satisfy = 'all';
+ $satisfy24begin = "";
+ $satisfy24end = "";
+ $davreaders = '';
+ }
+ elsif ($properties{'httpAccess'} eq 'local-pw') {
+- $allow = "$localAccess $externalSSLAccess";
+ $allow24 = "ip $localAccess $externalSSLAccess";
+ $pass = 1;
+- $satisfy = 'all';
+ $satisfy24begin = "";
+ $satisfy24end = "";
+ $davreaders = "Require user $readers";
+ }
+ elsif ($properties{'httpAccess'} eq 'global') {
+- $allow = 'all';
+ $allow24 = "all granted";
+ $pass = 0;
+- $satisfy = 'all';
+ $satisfy24begin = "";
+ $satisfy24end = "";
+ $davreaders = '';
+ }
+ elsif ($properties{'httpAccess'} eq 'global-pw') {
+- $allow = 'all';
+ $allow24 = "all granted";
+ $pass = 1;
+- $satisfy = 'all';
+ $satisfy24begin = "";
+ $satisfy24end = "";
+ $davreaders = "Require user $readers";
+ }
+ elsif ($properties{'httpAccess'} eq 'global-pw-remote') {
+- $allow = "$localAccess $externalSSLAccess";
+ $allow24 = "ip $localAccess $externalSSLAccess";
+- $davwallow = 'all';
+ $davwallow24 = "all granted";
+ $pass = 1;
+- $satisfy = 'any';
+ $satisfy24begin = "";
+ $satisfy24end = "";
+ $davreaders = "Require user $readers";
+@@ -118,7 +105,6 @@
+ next;
+ }
+ }
+- $davwallow = $allow if ($davwallow eq '');
+ $davwallow24 = $allow24 if ($davwallow24 eq '');
+ my $allowOverride = $properties{'AllowOverride'} || "None";
+ my $followSymLinks = $properties{'FollowSymLinks'} || "disabled";
+@@ -173,41 +159,22 @@
+ $OUT .= " DirectoryIndex index.shtml index.htm index.html\n";
+ $OUT .= " Options +IncludesNOEXEC\n";
+ $OUT .= " \n";
+- $OUT .= " \n";
+- $OUT .= " order deny,allow\n";
+- $OUT .= " Deny from all\n";
+- $OUT .= " \n";
+- $OUT .= " \n";
+- $OUT .= " Require all denied\n";
+- $OUT .= " \n";
++ $OUT .= " Require all denied\n";
+ $OUT .= " \n";
+ }
+
+ $OUT .= " AllowOverride $allowOverride\n";
+ unless ($webdav){
+- $OUT .= " \n";
+- $OUT .= " order deny,allow\n";
+- $OUT .= " deny from all\n";
+- $OUT .= " allow from $allow\n";
+- $OUT .= " \n";
+- $OUT .= " \n";
+ $OUT .= " $satisfy24begin\n";
+ $OUT .= " require user $readers\n" if ($pass);
+ $OUT .= " Require $allow24\n";
+ $OUT .= " $satisfy24end\n";
+- $OUT .= " \n";
+ }
+ if ($pass || $webdav) {
+ $OUT .= " AuthName \"$properties{'Name'}\"\n";
+ $OUT .= " AuthType Basic\n";
+ $OUT .= " AuthExternal pwauth\n";
+ $OUT .= " AuthBasicProvider external\n";
+- $OUT .= " \n" unless ($webdav);
+- $OUT .= " require user $readers\n" unless ($webdav);
+- $OUT .= " Satisfy $satisfy\n" unless ($webdav);
+- $OUT .= " \n" unless ($webdav);
+-
+-
+ }
+ # WebDav is enabled only when auth is required
+ if ($webdav) {
+@@ -216,35 +183,17 @@
+ Dav on
+ # Read only access
+
+-
+- order deny,allow
+- deny from all
+- allow from $allow
+- $davreaders
+- Satisfy $satisfy
+-
+-
+ $satisfy24begin
+ Require $allow24
+ $davreaders
+ $satisfy24end
+-
+
+ # Write access through webdav always requires authentication
+
+-
+- order deny,allow
+- deny from all
+- allow from $davwallow
+- Require user $writers
+- Satisfy all
+-
+-
+
+- Require $davwallow
++ Require $davwallow24
+ Require user $writers
+
+-
+
+
+ HERE
+@@ -258,13 +207,7 @@
+ }
+ else {
+ $OUT .= "\n";
+- $OUT .= " \n";
+- $OUT .= " order deny,allow\n";
+- $OUT .= " Deny from all\n";
+- $OUT .= " \n";
+- $OUT .= " \n";
+- $OUT .= " Require all denied\n";
+- $OUT .= " \n";
++ $OUT .= " Require all denied\n";
+ $OUT .= "\n";
+ }
+ }