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

Annotation 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.5 - (hide annotations) (download)
Tue Nov 25 16:20:26 2008 UTC (15 years, 6 months ago) by slords
Branch: MAIN
CVS Tags: smeserver-mod_dav-0_1-17_el4_sme, smeserver-mod_dav-0_1-18_el4_sme, HEAD
Changes since 1.4: +0 -0 lines
Restore

1 snetram 1.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 snetram 1.3 + use esmith::AccountsDB;
6     + my $adb = esmith::AccountsDB->open_ro();
7     + $OUT = "";
8     + foreach my $ibay ($adb->ibays)
9 snetram 1.1 + {
10 snetram 1.3 + 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\n";
17     + $OUT .= " # Enable DAV access for this directory tree\n";
18     + $OUT .= " DAV On\n\n";
19     + $OUT .= " AllowOverride None\n";
20     + $OUT .= " Options +Indexes \n\n";
21     + $OUT .= " # Allow fancy indexing by columns and download by clicking icon\n";
22     + $OUT .= " IndexOptions FancyIndexing IconsAreLinks\n\n";
23     + if ($properties{'Group'})
24     + {
25     + $OUT .= " AuthType Basic\n";
26     + $OUT .= " AuthExternal pwauth\n\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\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\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\n";
60     + $OUT .= " Allow from all\n";
61     + $OUT .= " Require valid-user\n\n";
62     + $OUT .= " </Limit>\n\n";
63     + $OUT .= "</Directory>\n";
64     + }
65 snetram 1.1 + }
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 snetram 1.3 @@ -0,0 +2 @@
71 snetram 1.1 +DAVLockDB /var/run/davLocks/DAVLock
72 snetram 1.3 +
73 snetram 1.1 --- 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 snetram 1.2 + $OUT .= "LoadModule dav_module\tmodules/mod_dav.so\n";
81     + $OUT .= "LoadModule dav_fs_module modules/mod_dav_fs.so\n";
82 snetram 1.1 }
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