aboutsummaryrefslogtreecommitdiffstats
path: root/modules/restrictshell
diff options
context:
space:
mode:
authorMichael Scherer <misc@mageia.org>2010-11-23 01:11:12 +0000
committerMichael Scherer <misc@mageia.org>2010-11-23 01:11:12 +0000
commit81946e2ca36d1805d20ccaebe782b12bb40e3c7e (patch)
tree9f95785e5659a8d515fe8ead399514e47d2f0a62 /modules/restrictshell
parent01cae5b08f26d3ca9034bd02b13b21e762e81149 (diff)
downloadpuppet-81946e2ca36d1805d20ccaebe782b12bb40e3c7e.tar
puppet-81946e2ca36d1805d20ccaebe782b12bb40e3c7e.tar.gz
puppet-81946e2ca36d1805d20ccaebe782b12bb40e3c7e.tar.bz2
puppet-81946e2ca36d1805d20ccaebe782b12bb40e3c7e.tar.xz
puppet-81946e2ca36d1805d20ccaebe782b12bb40e3c7e.zip
add class for scp and sftp
Diffstat (limited to 'modules/restrictshell')
-rw-r--r--modules/restrictshell/manifests/init.pp12
-rwxr-xr-xmodules/restrictshell/templates/membersh-conf.pl2
2 files changed, 14 insertions, 0 deletions
diff --git a/modules/restrictshell/manifests/init.pp b/modules/restrictshell/manifests/init.pp
index 3ce1e0d0..54452026 100644
--- a/modules/restrictshell/manifests/init.pp
+++ b/modules/restrictshell/manifests/init.pp
@@ -77,4 +77,16 @@ class restrictshell {
class allow_svn {
allow{ "svn": }
}
+
+ class allow_scp {
+ allow{ "scp": }
+ }
+
+ class allow_sftp {
+ allow{ "sftp": }
+ }
+ # technically, we could add cvs too
+ # but I doubt we will use it one day
+
+
}
diff --git a/modules/restrictshell/templates/membersh-conf.pl b/modules/restrictshell/templates/membersh-conf.pl
index 203a2c94..ea7d2957 100755
--- a/modules/restrictshell/templates/membersh-conf.pl
+++ b/modules/restrictshell/templates/membersh-conf.pl
@@ -11,6 +11,8 @@ $bin_rsync = "/usr/bin/rsync";
$regexp_rsync = "^rsync --server";
$regexp_dir_rsync = "^/.*";
+$bin_sftp = "<%= lib_dir %>/ssh/sftp-server";
+$regexp_sftp = "^(/usr/lib{64,}/ssh/sftp-server|/usr/lib/sftp-server|/usr/libexec/sftp-server|/usr/lib/openssh/sftp-server)";
foreach my $f (glob("/etc/membersh-conf.d/allow_*pl")) {
do($f)