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
--- 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
+++ 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
@@ -8,170 +8,169 @@
$OUT = "";
foreach my $ibay ($adb->ibays)
{
- my %properties = $ibay->props;
- my $key = $ibay->key;
- #------------------------------------------------------------
- # Figure out which combination of parameters to use. If
- # PublicAccess parameter is present, this is e-smith 4.0.
- # Otherwise, it's e-smith 3.0.
- #------------------------------------------------------------
-
- my $allow;
- my $pass;
- my $satisfy;
-
- if ($properties{'PublicAccess'})
- {
- if ($properties{'PublicAccess'} eq 'none')
- {
- next;
- }
- elsif ($properties{'PublicAccess'} eq 'local')
- {
- $allow = $localAccess;
- $pass = 0;
- $satisfy = 'all';
- }
- elsif ($properties{'PublicAccess'} eq 'local-pw')
- {
- $allow = $localAccess;
- $pass = 1;
- $satisfy = 'all';
- }
- elsif ($properties{'PublicAccess'} eq 'global')
- {
- $allow = 'all';
- $pass = 0;
- $satisfy = 'all';
- }
- elsif ($properties{'PublicAccess'} eq 'global-pw')
- {
- $allow = 'all';
- $pass = 1;
- $satisfy = 'all';
- }
- elsif ($properties{'PublicAccess'} eq 'global-pw-remote')
- {
- $allow = $localAccess;
- $pass = 1;
- $satisfy = 'any';
- }
- }
- elsif ($properties {'ReadAccess'} eq 'global')
- {
- if ($properties {'UsePassword'} eq 'yes')
- {
- $allow = 'all';
- $pass = 1;
- $satisfy = 'all';
- }
- else
- {
- $allow = 'all';
- $pass = 0;
- $satisfy = 'all';
- }
- }
- else
- {
- if ($properties {'UsePassword'} eq 'yes')
- {
- $allow = $localAccess;
- $pass = 1;
- $satisfy = 'all';
- }
- else
- {
- $allow = $localAccess;
- $pass = 0;
- $satisfy = 'all';
- }
- }
-
-
- my $allowOverride = $properties{'AllowOverride'} || "None";
- my $dynamicContent = $properties{'CgiBin'} || "disabled";
- my $followSymLinks = $properties{'FollowSymLinks'} || "disabled";
- my $indexes = $properties{'Indexes'} || "enabled";
- $OUT .= "\n";
- $OUT .= "#------------------------------------------------------------\n";
- $OUT .= "# $key ibay directories ($properties{'Name'})\n";
- $OUT .= "#------------------------------------------------------------\n";
-
- $OUT .= "\n";
- $OUT .= "\n";
- $OUT .= " Options None\n";
- $OUT .= " Options +Indexes\n" if ($indexes eq 'enabled');
- $OUT .= " Options +FollowSymLinks\n" if ($followSymLinks eq 'enabled');
- if ($dynamicContent eq 'enabled')
- {
- $OUT .= " Options +Includes\n";
- }
- else
- {
- $OUT .= " DirectoryIndex index.shtml index.htm index.html\n";
- $OUT .= " Options +IncludesNOEXEC\n";
- $OUT .= " \n";
- $OUT .= " order deny,allow\n";
- $OUT .= " Deny from all\n";
- $OUT .= " \n";
- }
- $OUT .= " AllowOverride $allowOverride\n";
- $OUT .= " order deny,allow\n";
- $OUT .= " deny from all\n";
- $OUT .= " allow from $allow\n";
- if ($pass)
- {
- $OUT .= " AuthName \"$properties{'Name'}\"\n";
- $OUT .= " AuthType Basic\n";
- $OUT .= " AuthBasicProvider external\n";
- $OUT .= " AuthExternal pwauth\n";
- $OUT .= " require user $key\n";
- $OUT .= " Satisfy $satisfy\n";
- }
-
- if (($properties{PHPRegisterGlobals} || 'disabled') eq 'enabled')
- {
- $OUT .= " php_flag register_globals on\n";
- }
- $OUT .= "\n";
-
- $OUT .= "\n";
- $OUT .= "\n";
- if ($dynamicContent eq 'enabled')
- {
- $OUT .= " Options ExecCGI\n";
- }
- $OUT .= " AllowOverride None\n";
- $OUT .= " order deny,allow\n";
- $OUT .= " deny from all\n";
- $OUT .= " allow from $allow\n";
- if ($pass)
- {
- $OUT .= " AuthName \"$properties{'Name'}\"\n";
- $OUT .= " AuthType Basic\n";
- $OUT .= " AuthBasicProvider external\n";
- $OUT .= " AuthExternal pwauth\n";
- $OUT .= " require user $key\n";
- $OUT .= " Satisfy $satisfy\n";
- }
- $OUT .= "\n";
-
- $OUT .= "\n";
- $OUT .= "\n";
- $OUT .= " AllowOverride None\n";
- $OUT .= " order deny,allow\n";
- $OUT .= " deny from all\n";
- $OUT .= " allow from $allow\n";
- if ($pass)
- {
- $OUT .= " AuthName \"$properties{'Name'}\"\n";
- $OUT .= " AuthType Basic\n";
- $OUT .= " AuthBasicProvider external\n";
- $OUT .= " AuthExternal pwauth\n";
- $OUT .= " require user $key\n";
- $OUT .= " Satisfy $satisfy\n";
- }
- $OUT .= "\n";
+ my %properties = $ibay->props;
+ my $key = $ibay->key;
+ #------------------------------------------------------------
+ # Figure out which combination of parameters to use. If
+ # PublicAccess parameter is present, this is e-smith 4.0.
+ # Otherwise, it's e-smith 3.0.
+ #------------------------------------------------------------
+
+ my $allow;
+ my $pass;
+ my $satisfy;
+
+ if ($properties{'PublicAccess'})
+ {
+ if ($properties{'PublicAccess'} eq 'none')
+ {
+ next;
+ }
+ elsif ($properties{'PublicAccess'} eq 'local')
+ {
+ $allow = $localAccess;
+ $pass = 0;
+ $satisfy = 'all';
+ }
+ elsif ($properties{'PublicAccess'} eq 'local-pw')
+ {
+ $allow = $localAccess;
+ $pass = 1;
+ $satisfy = 'all';
+ }
+ elsif ($properties{'PublicAccess'} eq 'global')
+ {
+ $allow = 'all';
+ $pass = 0;
+ $satisfy = 'all';
+ }
+ elsif ($properties{'PublicAccess'} eq 'global-pw')
+ {
+ $allow = 'all';
+ $pass = 1;
+ $satisfy = 'all';
+ }
+ elsif ($properties{'PublicAccess'} eq 'global-pw-remote')
+ {
+ $allow = $localAccess;
+ $pass = 1;
+ $satisfy = 'any';
+ }
+ }
+ elsif ($properties {'ReadAccess'} eq 'global')
+ {
+ if ($properties {'UsePassword'} eq 'yes')
+ {
+ $allow = 'all';
+ $pass = 1;
+ $satisfy = 'all';
+ }
+ else
+ {
+ $allow = 'all';
+ $pass = 0;
+ $satisfy = 'all';
+ }
+ }
+ else
+ {
+ if ($properties {'UsePassword'} eq 'yes')
+ {
+ $allow = $localAccess;
+ $pass = 1;
+ $satisfy = 'all';
+ }
+ else
+ {
+ $allow = $localAccess;
+ $pass = 0;
+ $satisfy = 'all';
+ }
+ }
+
+ my $allowOverride = $properties{'AllowOverride'} || "None";
+ my $dynamicContent = $properties{'CgiBin'} || "disabled";
+ my $followSymLinks = $properties{'FollowSymLinks'} || "disabled";
+ my $indexes = $properties{'Indexes'} || "enabled";
+ $OUT .= "\n";
+ $OUT .= "#------------------------------------------------------------\n";
+ $OUT .= "# $key ibay directories ($properties{'Name'})\n";
+ $OUT .= "#------------------------------------------------------------\n";
+
+ $OUT .= "\n";
+ $OUT .= "\n";
+ $OUT .= " Options None\n";
+ $OUT .= " Options +Indexes\n" if ($indexes eq 'enabled');
+ $OUT .= " Options +FollowSymLinks\n" if ($followSymLinks eq 'enabled');
+ if ($dynamicContent eq 'enabled')
+ {
+ $OUT .= " Options +Includes\n";
+ }
+ else
+ {
+ $OUT .= " DirectoryIndex index.shtml index.htm index.html\n";
+ $OUT .= " Options +IncludesNOEXEC\n";
+ $OUT .= " \n";
+ $OUT .= " order deny,allow\n";
+ $OUT .= " Deny from all\n";
+ $OUT .= " \n";
+ }
+ $OUT .= " AllowOverride $allowOverride\n";
+ $OUT .= " order deny,allow\n";
+ $OUT .= " deny from all\n";
+ $OUT .= " allow from $allow\n";
+ if ($pass)
+ {
+ $OUT .= " AuthName \"$properties{'Name'}\"\n";
+ $OUT .= " AuthType Basic\n";
+ $OUT .= " AuthBasicProvider external\n";
+ $OUT .= " AuthExternal pwauth\n";
+ $OUT .= " require user $key\n";
+ $OUT .= " Satisfy $satisfy\n";
+ }
+
+ if (($properties{PHPRegisterGlobals} || 'disabled') eq 'enabled')
+ {
+ $OUT .= " php_flag register_globals on\n";
+ }
+ $OUT .= "\n";
+
+ $OUT .= "\n";
+ $OUT .= "\n";
+ if ($dynamicContent eq 'enabled')
+ {
+ $OUT .= " Options ExecCGI\n";
+ }
+ $OUT .= " AllowOverride None\n";
+ $OUT .= " order deny,allow\n";
+ $OUT .= " deny from all\n";
+ $OUT .= " allow from $allow\n";
+ if ($pass)
+ {
+ $OUT .= " AuthName \"$properties{'Name'}\"\n";
+ $OUT .= " AuthType Basic\n";
+ $OUT .= " AuthBasicProvider external\n";
+ $OUT .= " AuthExternal pwauth\n";
+ $OUT .= " require user $key\n";
+ $OUT .= " Satisfy $satisfy\n";
+ }
+ $OUT .= "\n";
+
+ $OUT .= "\n";
+ $OUT .= "\n";
+ $OUT .= " AllowOverride None\n";
+ $OUT .= " order deny,allow\n";
+ $OUT .= " deny from all\n";
+ $OUT .= " allow from $allow\n";
+ if ($pass)
+ {
+ $OUT .= " AuthName \"$properties{'Name'}\"\n";
+ $OUT .= " AuthType Basic\n";
+ $OUT .= " AuthBasicProvider external\n";
+ $OUT .= " AuthExternal pwauth\n";
+ $OUT .= " require user $key\n";
+ $OUT .= " Satisfy $satisfy\n";
+ }
+ $OUT .= "\n";
}
}