Package: rsyslog
Version: 5.8.6-1
Severity: normal
Tags: patch
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu precise ubuntu-patch

Dear Maintainer,

I'd like for you to consider applying the attached patch to achieve the
following:

  * debian/rsyslog.conf: set $WorkDirectory to /var/spool/rsyslog, which is
    the example location in documentation. When not configured it defaults to
    '/', which is undesirable. (LP: #918947)
  * debian/rsyslog.dirs: add /var/spool/rsyslog/

This is Launchpad bug #918947[1].

In testing the imfile functionality, I learned that when $WorkDirectory
is not explicitly set, it defaults to '/'. This means that state files
are written directly in / (other rsyslog functionality presumably also
uses WorkDirectory). This violates the FHS and is generally unexpected.

Granted, it appears that at least with imfile, the file is created then
immediately unlinked while keeping the fd open so people won't typically
see these files in / (I am not sure of the other uses of WorkDirectory).
However, IMHO it seems reasonable to set an explicit WorkDirectory which
is FHS compliant and meets user expectations. It also allows for easier
integration with the Mandatory Access Control systems available in
Debian (ie, SELinux, AppArmor and Tomoyo).

Upstream documentation suggests /var/spool/rsyslog, which is the
directory I used in this patch.

Thank you in advance for considering the patch.

[1]https://bugs.launchpad.net/ubuntu/+source/rsyslog/+bug/918947

-- System Information:
Debian Release: wheezy/sid
  APT prefers precise-updates
  APT policy: (500, 'precise-updates'), (500, 'precise-security'), (500, 
'precise')
Architecture: amd64 (x86_64)

Kernel: Linux 3.2.0-9-generic (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
diff -Nru rsyslog-5.8.6/debian/changelog rsyslog-5.8.6/debian/changelog
diff -Nru rsyslog-5.8.6/debian/rsyslog.conf rsyslog-5.8.6/debian/rsyslog.conf
--- rsyslog-5.8.6/debian/rsyslog.conf	2011-12-20 10:12:26.000000000 -0600
+++ rsyslog-5.8.6/debian/rsyslog.conf	2012-01-19 16:24:05.000000000 -0600
@@ -48,6 +48,11 @@
 $PrivDropToGroup syslog
 
 #
+# Where to place spool files
+#
+$WorkDirectory /var/spool/rsyslog
+
+#
 # Include all config files in /etc/rsyslog.d/
 #
 $IncludeConfig /etc/rsyslog.d/*.conf
diff -Nru rsyslog-5.8.6/debian/rsyslog.dirs rsyslog-5.8.6/debian/rsyslog.dirs
--- rsyslog-5.8.6/debian/rsyslog.dirs	2012-01-04 16:08:29.000000000 -0600
+++ rsyslog-5.8.6/debian/rsyslog.dirs	2012-01-19 16:08:49.000000000 -0600
@@ -2,3 +2,4 @@
 /etc/apparmor.d/force-complain/
 /etc/apparmor.d/disable/
 /etc/apparmor.d/local/
+/var/spool/rsyslog/

Reply via email to