voxpupuli/puppet-logrotate

logrotate::rule adds blank su to wtmp and btmp

Closed this issue · 1 comments

Hi,

When enabling su directive for a log on a certain node, su is added to wtmp and btmp without user or group.

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet: 3.8.7
  • Ruby: 2.0.0p598
  • Distribution: CentOS 7.2.15111
  • Module version: 1.4.0 from 2016-05-30

How to reproduce (e.g Puppet code you use)

create a new logrotate::rule and add

su              => true,
su_owner   => 'apache',
su_group   => 'apache',

}
PS. The rule must not be wtmp or btmp

What are you seeing

The new rule:
+++ /tmp/puppet-file20160901-7674-m97syb 2016-09-01 08:53:46.469657902 +0200
@@ -8,5 +8,6 @@
missingok
rotate 4
size 2M

  • su apache apache
    weekly
    }

wtmp file:
--- /etc/logrotate.d/wtmp 2016-08-01 16:55:33.554317181 +0200
+++ /tmp/puppet-file20160901-7674-104n5n9 2016-09-01 08:53:46.509658075 +0200
@@ -8,4 +8,5 @@
monthly
nomissingok
rotate 1

  • su
    }

btmp file:
--- /etc/logrotate.d/btmp 2016-08-01 16:55:33.561317213 +0200
+++ /tmp/puppet-file20160901-7674-1aimh6 2016-09-01 08:53:46.532658174 +0200
@@ -8,4 +8,5 @@
missingok
monthly
rotate 1

  • su
    }

What behaviour did you expect instead

The su directive to be applied only to the new logrotate::rule

Output log

Any additional information you'd like to impart

After upgrading to Puppet4 this issue was automagically solved.