From 08b841714775a0a006d007852ff694f7d5a2971e Mon Sep 17 00:00:00 2001 From: Ossi Salmi Date: Tue, 21 Jan 2014 20:59:41 +0200 Subject: [PATCH 1/2] psacct: Tighten permissions on OpenBSD --- psacct/manifests/init.pp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/psacct/manifests/init.pp b/psacct/manifests/init.pp index 345b09d..fc440e7 100644 --- a/psacct/manifests/init.pp +++ b/psacct/manifests/init.pp @@ -54,9 +54,16 @@ class psacct::linux { # class psacct::openbsd { + file { "/var/account": + ensure => directory, + mode => "0750", + owner => "root", + group => "wheel", + } + file { "/var/account/acct": ensure => present, - mode => "0644", + mode => "0640", owner => "root", group => "wheel", notify => Exec["accton"], From 3a481a276980f3daa96d5bd8d16b259b50209dc0 Mon Sep 17 00:00:00 2001 From: Ossi Salmi Date: Wed, 22 Jan 2014 13:56:49 +0200 Subject: [PATCH 2/2] psacct: Lint fixes --- psacct/manifests/init.pp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/psacct/manifests/init.pp b/psacct/manifests/init.pp index fc440e7..610921b 100644 --- a/psacct/manifests/init.pp +++ b/psacct/manifests/init.pp @@ -23,20 +23,15 @@ class psacct { class psacct::linux { package { "psacct": + ensure => installed, name => $::operatingsystem ? { "debian" => "acct", "ubuntu" => "acct", default => "psacct", }, - ensure => installed, } service { "psacct": - name => $::operatingsystem ? { - "debian" => "acct", - "ubuntu" => "acct", - default => "psacct", - }, ensure => $::operatingsystem ? { "debian" => undef, "ubuntu" => undef, @@ -44,6 +39,11 @@ class psacct::linux { }, enable => true, hasstatus => true, + name => $::operatingsystem ? { + "debian" => "acct", + "ubuntu" => "acct", + default => "psacct", + }, require => Package["psacct"], }