summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorintrigeri <intrigeri@boum.org>2012-10-23 20:15:14 +0200
committerintrigeri <intrigeri@boum.org>2012-10-23 20:15:14 +0200
commit2823194661c8e5cc39047411bbdd98437f3f9037 (patch)
treeb5853ec5675a0fcb7fc64c24775ac391574ed8ce
parent8cf1e1a56ab59bceeb59e4195bcbb58e73f91e4c (diff)
Make basedir permissions configurable with $reprepro_basedir_mode.
When one wants to use the reprepro login to upload packages to incoming, too lax permissions on its $HOME make sshd unhappy, and one wants to fix that.
-rw-r--r--README8
-rw-r--r--manifests/init.pp7
2 files changed, 14 insertions, 1 deletions
diff --git a/README b/README
index 23b3765..2114f2d 100644
--- a/README
+++ b/README
@@ -10,6 +10,14 @@ existence, ownership and permissions are.
Default: true.
+$reprepro_basedir_mode
+-----------------------
+
+This module manages the reprepro base directory and sets its
+permissions to $reprepro_basedir_mode.
+
+Default: 0771
+
$reprepro_incoming_mode
-----------------------
diff --git a/manifests/init.pp b/manifests/init.pp
index bbeb17c..1a64136 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -34,6 +34,11 @@ class reprepro {
}
}
+ $basedir_mode = $reprepro_basedir_mode ? {
+ '' => 0771,
+ default => $reprepro_basedir_mode,
+ }
+
$incoming_mode = $reprepro_incoming_mode ? {
'' => 1777,
default => $reprepro_incoming_mode,
@@ -57,7 +62,7 @@ class reprepro {
file {
"$basedir":
ensure => directory,
- mode => 0771, owner => reprepro, group => reprepro;
+ mode => $basedir_mode, owner => reprepro, group => reprepro;
"$basedir/conf":
ensure => directory,