--- rpms/smeserver-mod_dav/contribs7/smeserver-mod_dav-0.1-ImplementDAVForIbays.patch 2008/03/23 14:36:02 1.2 +++ rpms/smeserver-mod_dav/contribs7/smeserver-mod_dav-0.1-ImplementDAVForIbays.patch 2008/03/23 16:28:10 1.3 @@ -2,74 +2,74 @@ +++ smeserver-mod_dav-0.1/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/95Addmod_dav2ibays 2008-03-23 14:29:45.000000000 +0100 @@ -0,0 +1,64 @@ +{ -+ use esmith::AccountsDB; -+ my $adb = esmith::AccountsDB->open_ro(); -+ $OUT = ""; -+ foreach my $ibay ($adb->ibays) -+ { -+ my %properties = $ibay->props; -+ my $key = $ibay->key; -+ if ($properties{'ModDav'}) -+ { -+ if ($properties{'ModDav'} eq 'enabled') -+ { -+ $OUT .= "\n\n"; -+ $OUT .= " # Turn DAV on for this directory tree\n"; -+ $OUT .= " DAV On\n"; -+ $OUT .= " AllowOverride None\n"; -+ $OUT .= " Options +Indexes \n"; -+ $OUT .= " # Allow fancy indexing by columns and download by clicking icon\n"; -+ $OUT .= " IndexOptions FancyIndexing IconsAreLinks\n"; -+ if ($properties{'Group'}) ++ use esmith::AccountsDB; ++ my $adb = esmith::AccountsDB->open_ro(); ++ $OUT = ""; ++ foreach my $ibay ($adb->ibays) + { -+ $OUT .= " AuthType Basic\n"; -+ $OUT .= " AuthExternal pwauth\n"; -+ # Save groupname and find it in the group list -+ $iBayGroup = $properties{'Group'}; -+ foreach my $group ($adb->groups) -+ { -+ my %groupprops = $group->props; -+ my $grpkey = $group->key; -+ if ($grpkey eq $iBayGroup) -+ { -+ # we have the group that owns the DAV iBay -+ # If there are members of the group validate on them, -+ # otherwise on the ibayname -+ if ($groupprops{'Members'}) -+ { -+ # need to break user list on commas then output each one... -+ my @values = split(',',$groupprops{'Members'}); -+ $OUT .= " # Replace ibay name with any valid group member to validate\n"; -+ $OUT .= " Require user "; -+ foreach my $val (@values) { -+ $OUT .= $val . " "; ++ my %properties = $ibay->props; ++ my $key = $ibay->key; ++ if ($properties{'ModDav'}) ++ { ++ if ($properties{'ModDav'} eq 'enabled') ++ { ++ $OUT .= "\n\n\n"; ++ $OUT .= " # Enable DAV access for this directory tree\n"; ++ $OUT .= " DAV On\n\n"; ++ $OUT .= " AllowOverride None\n"; ++ $OUT .= " Options +Indexes \n\n"; ++ $OUT .= " # Allow fancy indexing by columns and download by clicking icon\n"; ++ $OUT .= " IndexOptions FancyIndexing IconsAreLinks\n\n"; ++ if ($properties{'Group'}) ++ { ++ $OUT .= " AuthType Basic\n"; ++ $OUT .= " AuthExternal pwauth\n\n"; ++ # Save groupname and find it in the group list ++ $$iBayGroup = $properties{'Group'}; ++ foreach my $group ($adb->groups) ++ { ++ my %groupprops = $group->props; ++ my $grpkey = $group->key; ++ if ($grpkey eq $iBayGroup) ++ { ++ # we have the group that owns the DAV iBay ++ # If there are members of the group validate on them, ++ # otherwise on the ibayname ++ if ($groupprops{'Members'}) ++ { ++ # need to break user list on commas then output each one... ++ my @values = split(',',$groupprops{'Members'}); ++ $OUT .= " # Replace ibay name with any valid group member to validate\n"; ++ $OUT .= " Require user "; ++ foreach my $val (@values) { ++ $OUT .= $val . " "; ++ } ++ $OUT .= "\n\n"; ++ } ++ else ++ { ++ # No group members so use ibay name for validation ++ $OUT .= " # use ibay name to validate\n"; ++ $OUT .= " Require user " . $key . "\n\n"; ++ } ++ } ++ } ++ } ++ # Ensure only valid users get to do stuff... ++ $OUT .= " \n\n"; ++ $OUT .= " Allow from all\n"; ++ $OUT .= " Require valid-user\n\n"; ++ $OUT .= " \n\n"; ++ $OUT .= "\n"; ++ } + } -+ $OUT .= "\n"; -+ } -+ else -+ { -+ # No group members so use ibay name for validation -+ $OUT .= " # use ibay name to validate\n"; -+ $OUT .= " Require user " . $key . "\n"; -+ } -+ } -+ } + } -+ # Ensure only valid users get to do stuff... -+ $OUT .= " \n"; -+ $OUT .= " allow from all\n"; -+ $OUT .= " Require valid-user\n"; -+ $OUT .= " \n"; -+ $OUT .= "\n"; -+ } -+ } -+ } +} --- smeserver-mod_dav-0.1/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/35DavLock.ImplementDAVForIbays 2008-03-23 14:28:37.000000000 +0100 +++ smeserver-mod_dav-0.1/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/35DavLock 2008-03-23 14:27:39.000000000 +0100 -@@ -0,0 +1 @@ +@@ -0,0 +2 @@ +DAVLockDB /var/run/davLocks/DAVLock -\ No newline at end of file ++ --- smeserver-mod_dav-0.1/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/20LoadModule80mod_dav.ImplementDAVForIbays 2006-05-29 16:59:55.000000000 +0200 +++ smeserver-mod_dav-0.1/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/20LoadModule80mod_dav 2008-03-23 14:26:18.000000000 +0100 @@ -3,6 +3,7 @@