diff options
author | jonoterc <jon_obuchowski@terc.edu> | 2013-10-10 17:29:14 -0400 |
---|---|---|
committer | Adam Jahn <ajjahn@gmail.com> | 2014-01-10 18:15:26 -0500 |
commit | e8be6764c89c7670e950db74551f94b138661ae2 (patch) | |
tree | e87407012636f28c7bb087f2dc36a679d4162e4f /manifests | |
parent | 8bf623bca5a1e9d5da1ed05a8a9cb2a773ee55fb (diff) | |
download | puppet-samba-e8be6764c89c7670e950db74551f94b138661ae2.tar.gz puppet-samba-e8be6764c89c7670e950db74551f94b138661ae2.tar.bz2 |
enabling configuration to enumerate users who can access a given share
adding support for "valid users" smbd.conf configuration option to samba::server::share
Diffstat (limited to 'manifests')
-rw-r--r-- | manifests/server/share.pp | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/manifests/server/share.pp b/manifests/server/share.pp index b8e508c..2e0c0ba 100644 --- a/manifests/server/share.pp +++ b/manifests/server/share.pp @@ -15,7 +15,10 @@ define samba::server::share($ensure = present, $read_only = '', $public = '', $writable = '', - $printable = '') { + $printable = '', + $valid_users = '', + ) { + $incl = $samba::server::incl $context = $samba::server::context $target = "target[. = '${name}']" @@ -119,5 +122,15 @@ define samba::server::share($ensure = present, require => Augeas["${name}-section"], notify => Class['samba::server::service'] } + + augeas { "${name}-valid_users": + context => $context, + changes => $printable ? { + default => "set ${target}/valid users '${valid_users}'", + '' => "rm ${target}/valid users", + }, + require => Augeas["${name}-section"], + notify => Class['samba::server::service'] + } } } |