Commit 2bd7cbd1 authored by Karl Kornel's avatar Karl Kornel
Browse files

syslog: Ubuntu uses a non-root account for syslog files

parent f9d68841
......@@ -25,8 +25,19 @@
class base::syslog {
# Ubuntu uses a separate account for syslog
if ( $::operatingsystem == 'Ubuntu' ) {
$syslog_owner = 'syslog'
$syslog_group = 'adm'
} else {
$syslog_owner = 'root'
$syslog_group = 'root'
}
base::syslog::config::syslog { '/etc/syslog.conf':
ensure => present,
owner => $syslog_owner,
group => $syslog_group,
}
# RHEL4/5 are ancient and use syslog, everything modern uses rsyslog
......@@ -42,7 +53,11 @@ class base::syslog {
name => 'rsyslog',
hasstatus => true,
}
base::syslog::config::rsyslog { '/etc/rsyslog.conf': ensure => present }
base::syslog::config::rsyslog { '/etc/rsyslog.conf':
ensure => present,
owner => $syslog_owner,
group => $syslog_group,
}
}
# Create a symlink from /var/log/syslog to /var/log/messages for the
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment