--- smeserver-mod_dav-0.1/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/95Addmod_dav2ibays.ImplementDAVForIbays 2008-03-23 14:29:55.000000000 +0100 +++ 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'}) + { + $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 . " "; + } + $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 @@ +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 @@ my $status = $modDAV{status} || 'disabled'; if ( $status eq "enabled" ) { - $OUT = "LoadModule dav_module\tmodules/mod_dav.so"; + $OUT = "LoadModule dav_module\tmodules/mod_dav.so\n"; + $OUT = "LoadModule dav_fs_module modules/mod_dav_fs.so\n"; } } --- smeserver-mod_dav-0.1/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/75BrowserMatchmod_dav.ImplementDAVForIbays 2008-03-23 14:29:19.000000000 +0100 +++ smeserver-mod_dav-0.1/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/75BrowserMatchmod_dav 2008-03-23 14:29:09.000000000 +0100 @@ -0,0 +1,11 @@ +# +# The following directive disables redirects on non-GET requests for +# a directory that does not include the trailing slash. This fixes a +# problem with Microsoft WebFolders which does not appropriately handle +# redirects for folders with DAV methods. +# Same deal with Apple's DAV filesystem and Gnome VFS support for DAV. +# +BrowserMatch "Microsoft Data Access Internet Publishing Provider" redirect-carefully +BrowserMatch "^WebDrive" redirect-carefully +BrowserMatch "^WebDAVFS/1.[012]" redirect-carefully +BrowserMatch "^gnome-vfs" redirect-carefully