Postfix init.d scripts malfunction in an unprivilleged Docker container

Bug #1444968 reported by Ernestas
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
postfix (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

It would be beneficial to change 52 line in /etc/init.d/postfix from:
        dir=$(ls -l /proc/$pid/exe 2>/dev/null | sed 's/.* -> //; s/\/[^\/]*$//')
to:
        dir=$(cat /proc/$pid/task/$pid/cmdline 2>/dev/null)

First, it's obviously shorter. Second, it would work in Docker. It does require additional kernel capabilities for looking into /proc/$pid/exe. By default, Docker (and I presume that the same situation is with LXC containers as well) does not give permission to /proc/$pid/exe, but does provide access to contents of cmdline.

Revision history for this message
Scott Kitterman (kitterman) wrote :

This was fixed in 3.4.7-2.

Changed in postfix (Ubuntu):
status: New → 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.