Merge branch 'master' of bitbucket.org:tmakinen/puppet
This commit is contained in:
commit
9058548f58
3 changed files with 48 additions and 6 deletions
|
@ -167,12 +167,16 @@ class sendmail::client::msa inherits sendmail::client {
|
|||
$ssl_key = basename($sendmail_ssl_key)
|
||||
$ssl_cert = basename($sendmail_ssl_cert)
|
||||
file { "${ssl::private}/${ssl_key}":
|
||||
ensure => present,
|
||||
mode => "0640",
|
||||
owner => "root",
|
||||
group => "smmsp",
|
||||
source => $sendmail_ssl_key,
|
||||
notify => Service["sendmail"],
|
||||
ensure => present,
|
||||
mode => "0640",
|
||||
owner => "root",
|
||||
group => "smmsp",
|
||||
source => $sendmail_ssl_key,
|
||||
require => $::operatingsystem ? {
|
||||
"openbsd" => undef,
|
||||
default => Package["sendmail"],
|
||||
},
|
||||
notify => Service["sendmail"],
|
||||
}
|
||||
file { "${ssl::certs}/${ssl_cert}":
|
||||
ensure => present,
|
||||
|
|
24
sudo/files/fakesudo
Normal file
24
sudo/files/fakesudo
Normal file
|
@ -0,0 +1,24 @@
|
|||
#!/bin/sh
|
||||
|
||||
trap report SIGINT SIGTERM
|
||||
|
||||
function askpw {
|
||||
read -s -p "Password:" password
|
||||
password=""
|
||||
echo ""
|
||||
echo "Sorry, try again."
|
||||
}
|
||||
|
||||
function report {
|
||||
stty echo # Fix echo if ^C during password prompt
|
||||
( whoami ; date ) | mailx -s "Someone sudo'ed (`id -un`, ${SSH_CONNECTION})" root
|
||||
exit 1
|
||||
}
|
||||
|
||||
function main {
|
||||
for try in 1 2 3; do askpw; done
|
||||
echo "sudo: 3 incorrect password attempts"
|
||||
report
|
||||
}
|
||||
|
||||
main
|
|
@ -37,6 +37,20 @@ class sudo {
|
|||
|
||||
}
|
||||
|
||||
# Install fake sudo
|
||||
#
|
||||
class sudo::fake {
|
||||
|
||||
file { "/usr/bin/sudo":
|
||||
ensure => present,
|
||||
mode => 0555,
|
||||
owner => "root",
|
||||
group => "root",
|
||||
source => "puppet:///modules/sudo/fakesudo",
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
# Add sudoer.
|
||||
#
|
||||
# === Parameters
|
||||
|
|
Loading…
Add table
Reference in a new issue