aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2013-04-11 14:09:50 -0300
committerSilvio Rhatto <rhatto@riseup.net>2013-04-11 14:09:50 -0300
commit51df8cf09a7a3ec96bb203b7d5ad1af47440ef5a (patch)
treeffb87ae67a02b5b0a7d98c04b8d79d2b5900c728
parente7169dbe22c7e716dbf4913846aeae195f0bfd8b (diff)
downloadpuppet-ikiwiki-51df8cf09a7a3ec96bb203b7d5ad1af47440ef5a.tar.gz
puppet-ikiwiki-51df8cf09a7a3ec96bb203b7d5ad1af47440ef5a.tar.bz2
CGI backend still needs suid
-rw-r--r--manifests/init.pp3
-rw-r--r--manifests/instance.pp4
-rw-r--r--templates/ikiwiki.setup.erb4
3 files changed, 6 insertions, 5 deletions
diff --git a/manifests/init.pp b/manifests/init.pp
index 864f6aa..b2c25b2 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -1,6 +1,7 @@
class ikiwiki(
$sites_folder = '/var/sites',
- $git_implementation = 'gitolite'
+ $git_implementation = 'gitolite',
+ $www_user = 'www-data'
) {
package { [ "ikiwiki", "po4a" ]:
ensure => installed,
diff --git a/manifests/instance.pp b/manifests/instance.pp
index 8aeb291..ac8618a 100644
--- a/manifests/instance.pp
+++ b/manifests/instance.pp
@@ -84,8 +84,8 @@ define ikiwiki::instance($base_url = $domain, $ensure = 'present', $description
file { "${ikiwiki::sites_folder}/${name}/${instance}/ikiwiki.cgi":
ensure => present,
owner => $owner,
- group => $group,
- mode => 0550,
+ group => $ikiwiki::www_user,
+ mode => 6550,
require => File["/etc/ikiwiki/$name.setup"],
}
}
diff --git a/templates/ikiwiki.setup.erb b/templates/ikiwiki.setup.erb
index 12c9d1a..f661866 100644
--- a/templates/ikiwiki.setup.erb
+++ b/templates/ikiwiki.setup.erb
@@ -64,8 +64,8 @@ use IkiWiki::Setup::Standard {
# The cgi wrapper.
cgi => 1,
wrapper => "<%= scope.lookupvar('ikiwiki::sites_folder') %>/<%= name %>/ikiwiki/ikiwiki.cgi",
- wrappermode => "00550",
- wrappergroup => "<%= group %>",
+ wrappermode => "06550",
+ wrappergroup => "<%= scope.lookupvar('ikiwiki::www_user') %>",
},
#{
# # The svn post-commit wrapper.