Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to set user jail and fix order of config file loading #4

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file removed manifests/.config.pp.swp
Binary file not shown.
7 changes: 7 additions & 0 deletions manifests/config.pp
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
$allow_overwrite = $proftpd::params::allow_overwrite,
$transfer_log = $proftpd::params::transfer_log,
$system_log = $proftpd::params::system_log,
$user_jail = $proftpd::params::user_jail,

$tls_engine = $proftpd::params::tls_engine,
$tls_log = $proftpd::params::tls_log,
Expand Down Expand Up @@ -162,6 +163,12 @@
proftpd::mods {'odbc': ensure => 'absent' }
}

if $ldap_engine == 'on' {
proftpd::mods {'ldap': ensure => 'present'}
} else {
proftpd::mods {'ldap': ensure => 'absent'}
}

exec { 'proftpd-reload':
command => "service ${service_name} reload",
logoutput => on_failure,
Expand Down
1 change: 1 addition & 0 deletions manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
$group = 'nogroup'
$umask = '022 022'
$allow_overwrite = 'on'
$user_jail = false

$sql_engine = 'off'
$sql_backend = 'mysql'
Expand Down
7 changes: 5 additions & 2 deletions templates/proftpd.conf.erb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@ ModuleControlsACLs insmod,rmmod allow user root
ModuleControlsACLs lsmod allow user *

# Includes DSO modules
Include /etc/proftpd/mods-enabled/
Include /etc/proftpd/mods-enabled/*.load
# Include config for DSO modules
# .conf files were getting loaded before the module was loaded so were getting ignored
Include /etc/proftpd/mods-enabled/*.conf

# Set off to disable IPv6 support which is annoying on IPv4 only boxes.
UseIPv6 <%= use_ipv6 %>
Expand All @@ -41,7 +44,7 @@ ListOptions "<%= list_options %>"
DenyFilter <%= deny_filter %>

# Use this to jail all users in their homes
# DefaultRoot ~
<% if user_jail == true %>DefaultRoot ~<% end %>

# Users require a valid shell listed in /etc/shells to login.
# Use this directive to release that constrain.
Expand Down