qpsmtpd should create /var/run/qpsmtpd in init.d (/var/run/ is tmpfs)

Bug #72602 reported by enyc
2
Affects Status Importance Assigned to Milestone
qpsmtpd (Ubuntu)
Fix Released
Low
Daniel T Chen

Bug Description

Binary package hint: qpsmtpd

The package 'qpsmtpd' on installation creates /var/run/qpsmtpd as an empty directory with permissions "drwxr-sr-x qpsmtpd qpsmtpd" (user:qpsmtpd group:qpsmtpd mode:2755).

This _might_ be used to store greylist database or other files that might benefit from persistent state across reboots! I (enyc) have not got the greylist database to appear at all, however, so I am not sure where this is stored.

In any case, at the least, this package needs something like:-

"mkdir -p /var/run/qpsmtpd"
"chown qpsmtpd:qpsmtpd /var/run/qpsmtpd"
"chmod 2755 /var/run/qpsmtpd"

or similar.. in the init-script so that upon reboot the qpsmtpd continues to work,
rather than failing to find /var/run/qpsmtpd and not working!

Paul Sladen (sladen)
Changed in qpsmtpd:
importance: Undecided → Medium
status: Unconfirmed → Confirmed
Revision history for this message
enyc (enyc) wrote :

I can see what needs patching as-above (very simple really), but I need to know in what form to create a patch (i.e. where to put the source-tree directories w.r.t. each other with what names and any special flags on diff to use).

Will somebody point me at relevant help/information on this?

Revision history for this message
enyc (enyc) wrote :

On further investigation, the group given to /var/run/qpsmtpd by this package-from-debian in dapper+edgy+feisty is actually "adm" and not "qpsmtpd" (Not sure how I made that mistake!).

The debian/qpsmtpd.postinst uses:-
 RUNAS=qpsmtpd
 PIDDIR=/var/run/qpsmtpd
 dpkg-statoverride --update --add "$RUNAS" adm 2755 "$PIDDIR"
(to set the permissions on /var/run/qpsmtpd from the package)

This patch simply creates (if needed) and updates those permissions on the /var/run/qpsmtpd dir at init.d start time, using the RUNAS set in the init script. This is implemented with a dpatch to the source-package, in the debdiff below.

The attached patch fixes the problem in the feisty package so that qpsmtpd (after being configured with dpkg-reconfigure of-course) continues to work after reboots on ubuntu! I have tested this as best as I can and all seems to be well now.

P.S. this does not affect greylist database as that is apparently in /var/lib/qpsmtpd/greylisting, outside the /var/run directory.

Revision history for this message
Daniel T Chen (crimsun) wrote :

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Sat, 23 Dec 2006 09:12:30 +0000
Source: qpsmtpd
Binary: qpsmtpd
Architecture: source
Version: 0.32-4ubuntu1
Distribution: feisty
Urgency: low
Maintainer: Devin Carraway <email address hidden>
Changed-By: enyc <email address hidden>
Description:
 qpsmtpd - Flexible SMTP daemon for network-level spam detection
Changes:
 qpsmtpd (0.32-4ubuntu1) feisty; urgency=low
 .
   * debian/patches/init-creates-var-run-qpsmtpd.dpatch: Create
     /var/run/qpsmtpd in initscript (Closes Ubuntu: #72602).
Files:
 0fcaf4f8c4db516aca01e1ea1f504e80 588 mail extra qpsmtpd_0.32-4ubuntu1.dsc
 6f6d94243abcbc1e4869932ff24b70e2 27441 mail extra qpsmtpd_0.32-4ubuntu1.diff.gz

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFFlN2xe9GwFciKvaMRAn4bAKDD/rLyRFxgpxBbBzz+zlni52GGqwCgkTkC
65+AUBhB/jqiFPohAbKULUo=
=vMCf
-----END PGP SIGNATURE-----

Changed in qpsmtpd:
assignee: nobody → crimsun
importance: Medium → Low
status: Confirmed → Fix Committed
Daniel T Chen (crimsun)
Changed in qpsmtpd:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.