summaryrefslogtreecommitdiff
path: root/extra/gnome-user-share/fix-no-password-mode.patch
blob: d57e72b8d392781876af9bd68cb88e507507bc8e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
From a1afc2e9aa3b86f408739e78bd23382c53df5b5c Mon Sep 17 00:00:00 2001
From: Josselin Mouette <joss@debian.org>
Date: Tue, 24 Jun 2014 15:00:36 +0200
Subject: data: Fix httpd configuration with require_password=never
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

The AuthType, AuthName, AuthDigestDomain, AuthDigestProvider,
AuthUserFile and AuthGroupFile directives should be in an
<IfDefine> section, executed only when password authentication
is configured, otherwise we get this error:
"AuthType configured with no corresponding authorization directives"

Thanks to scorpy_sk@yahoo.com and Arno Töll.

diff --git a/data/dav_user_2.4.conf b/data/dav_user_2.4.conf
index de2e885..9604637 100644
--- a/data/dav_user_2.4.conf
+++ b/data/dav_user_2.4.conf
@@ -30,20 +30,28 @@ DNSSDAutoRegisterUserDir Off
   <Location />
     DAV On
 
-    AuthType Digest
-    AuthName "${GUS_LOGIN_LABEL}"
-    AuthDigestDomain /
+    <IfDefine RequirePasswordAlways>
+      AuthType Digest
+      AuthName "${GUS_LOGIN_LABEL}"
+      AuthDigestDomain /
 
-    AuthDigestProvider file
-    AuthUserFile ${XDG_CONFIG_HOME}/user-share/passwd
-    AuthGroupFile /usr/share/gnome-user-share/dav_groupfile
+      AuthDigestProvider file
+      AuthUserFile ${XDG_CONFIG_HOME}/user-share/passwd
+      AuthGroupFile /usr/share/gnome-user-share/dav_groupfile
 
-    <IfDefine RequirePasswordAlways>
       Require user guest
       Require group guest
     </IfDefine>
 
     <IfDefine RequirePasswordOnWrite>
+      AuthType Digest
+      AuthName "${GUS_LOGIN_LABEL}"
+      AuthDigestDomain /
+
+      AuthDigestProvider file
+      AuthUserFile ${XDG_CONFIG_HOME}/user-share/passwd
+      AuthGroupFile /usr/share/gnome-user-share/dav_groupfile
+
       <LimitExcept GET OPTIONS PROPFIND>
         Require user guest
         Require group guest
-- 
cgit v0.10.1