Skip to content

Commit

Permalink
Merge pull request #19 from jordiprats/master
Browse files Browse the repository at this point in the history
basic ubuntu 18
  • Loading branch information
jordiprats authored May 3, 2018
2 parents 1d04577 + 307e1cf commit 92fb7cc
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 12 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# CHANGELOG

## 0.1.16

* added ensure to **pam::securetty**
* basic Ubuntu 18.04 support

## 0.1.15

* added ensure to **pam::ttyaudit**
Expand Down
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ PAM modules, /etc/security/limits.conf and /etc/securetty management

## Module Description

PAM module management for RHEL and derivatives, partial support for Ubuntu

### pam::lockout

CIS compliance using pam_faillock for CentOS 6 and 7:
Expand Down Expand Up @@ -132,7 +134,7 @@ All items support the values -1, unlimited or infinity indicating no limit, exce

## Limitations

This is where you list OS compatibility, version compatibility, etc.
* Partial Ubuntu support

## Development

Expand All @@ -141,7 +143,7 @@ have some test to check both presence and absence of any feature

### TODO

TODO list
* improve Ubuntu support

### Contributing

Expand Down
2 changes: 1 addition & 1 deletion manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
{
case $::operatingsystemrelease
{
/^1[46].*$/:
/^1[468].*$/:
{
$pam_lockout='tally2'
}
Expand Down
26 changes: 19 additions & 7 deletions manifests/securetty.pp
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
# puppet2sitepp @securettys
# @param tty tty name (default: resource's name)
# @param order securetty order (default: 42)
define pam::securetty (
$tty = $name,
$order = '42',
$tty = $name,
$order = '42',
$ensure = 'present',
) {

if(!defined(Concat['/etc/securetty']))
Expand All @@ -14,12 +17,21 @@
}
}

if(!empty($tty))
case $ensure
{
concat::fragment { "securetty ${tty}":
target => '/etc/securetty',
order => $order,
content => "${tty}\n",
'present':
{
if(!empty($tty))
{
concat::fragment { "securetty ${tty}":
target => '/etc/securetty',
order => $order,
content => "${tty}\n",
}
}
}
default: {}
}


}
4 changes: 2 additions & 2 deletions metadata.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "eyp-pam",
"version": "0.1.15",
"version": "0.1.16",
"author": "eyp",
"summary": "PAM modules, /etc/security/limits.conf and /etc/securetty management",
"license": "Apache-2.0",
Expand Down Expand Up @@ -35,7 +35,7 @@
},
{
"operatingsystem": "Ubuntu",
"operatingsystemrelease": [ "14.04", "16.04" ]
"operatingsystemrelease": [ "14.04", "16.04", "18.04" ]
}
],
"requirements": [
Expand Down

0 comments on commit 92fb7cc

Please sign in to comment.