/[smecontribs]/rpms/smeserver-mod_dav/contribs7/smeserver-mod_dav-0.1-ImplementDAVForIbays.patch
ViewVC logotype

Contents of /rpms/smeserver-mod_dav/contribs7/smeserver-mod_dav-0.1-ImplementDAVForIbays.patch

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


Revision 1.2 - (show annotations) (download)
Sun Mar 23 14:36:02 2008 UTC (16 years, 8 months ago) by snetram
Branch: MAIN
Changes since 1.1: +2 -2 lines
* Sun Mar 23 2008 Jonathan Martens <smeserver-contribs@snetram.nl>
- 0.1-8
- Fixed template issue created in 0.1-7 by [SME: 3470]

1 --- 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
2 +++ 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
3 @@ -0,0 +1,64 @@
4 +{
5 + use esmith::AccountsDB;
6 + my $adb = esmith::AccountsDB->open_ro();
7 + $OUT = "";
8 + foreach my $ibay ($adb->ibays)
9 + {
10 + my %properties = $ibay->props;
11 + my $key = $ibay->key;
12 + if ($properties{'ModDav'})
13 + {
14 + if ($properties{'ModDav'} eq 'enabled')
15 + {
16 + $OUT .= "\n<Directory /home/e-smith/files/ibays/$key/html>\n";
17 + $OUT .= " # Turn DAV on for this directory tree\n";
18 + $OUT .= " DAV On\n";
19 + $OUT .= " AllowOverride None\n";
20 + $OUT .= " Options +Indexes \n";
21 + $OUT .= " # Allow fancy indexing by columns and download by clicking icon\n";
22 + $OUT .= " IndexOptions FancyIndexing IconsAreLinks\n";
23 + if ($properties{'Group'})
24 + {
25 + $OUT .= " AuthType Basic\n";
26 + $OUT .= " AuthExternal pwauth\n";
27 + # Save groupname and find it in the group list
28 + $iBayGroup = $properties{'Group'};
29 + foreach my $group ($adb->groups)
30 + {
31 + my %groupprops = $group->props;
32 + my $grpkey = $group->key;
33 + if ($grpkey eq $iBayGroup)
34 + {
35 + # we have the group that owns the DAV iBay
36 + # If there are members of the group validate on them,
37 + # otherwise on the ibayname
38 + if ($groupprops{'Members'})
39 + {
40 + # need to break user list on commas then output each one...
41 + my @values = split(',',$groupprops{'Members'});
42 + $OUT .= " # Replace ibay name with any valid group member to validate\n";
43 + $OUT .= " Require user ";
44 + foreach my $val (@values) {
45 + $OUT .= $val . " ";
46 + }
47 + $OUT .= "\n";
48 + }
49 + else
50 + {
51 + # No group members so use ibay name for validation
52 + $OUT .= " # use ibay name to validate\n";
53 + $OUT .= " Require user " . $key . "\n";
54 + }
55 + }
56 + }
57 + }
58 + # Ensure only valid users get to do stuff...
59 + $OUT .= " <Limit GET PUT POST DELETE PROPFIND PROPPATCH MKCOL COPY MOVE LOCK UNLOCK>\n";
60 + $OUT .= " allow from all\n";
61 + $OUT .= " Require valid-user\n";
62 + $OUT .= " </Limit>\n";
63 + $OUT .= "</Directory>\n";
64 + }
65 + }
66 + }
67 +}
68 --- 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
69 +++ smeserver-mod_dav-0.1/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/35DavLock 2008-03-23 14:27:39.000000000 +0100
70 @@ -0,0 +1 @@
71 +DAVLockDB /var/run/davLocks/DAVLock
72 \ No newline at end of file
73 --- 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
74 +++ 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
75 @@ -3,6 +3,7 @@
76 my $status = $modDAV{status} || 'disabled';
77 if ( $status eq "enabled" )
78 {
79 - $OUT = "LoadModule dav_module\tmodules/mod_dav.so";
80 + $OUT .= "LoadModule dav_module\tmodules/mod_dav.so\n";
81 + $OUT .= "LoadModule dav_fs_module modules/mod_dav_fs.so\n";
82 }
83 }
84 --- 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
85 +++ 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
86 @@ -0,0 +1,11 @@
87 +#
88 +# The following directive disables redirects on non-GET requests for
89 +# a directory that does not include the trailing slash. This fixes a
90 +# problem with Microsoft WebFolders which does not appropriately handle
91 +# redirects for folders with DAV methods.
92 +# Same deal with Apple's DAV filesystem and Gnome VFS support for DAV.
93 +#
94 +BrowserMatch "Microsoft Data Access Internet Publishing Provider" redirect-carefully
95 +BrowserMatch "^WebDrive" redirect-carefully
96 +BrowserMatch "^WebDAVFS/1.[012]" redirect-carefully
97 +BrowserMatch "^gnome-vfs" redirect-carefully

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