Bug 134363 - should use /var/run/sendmail/sendmail.pid and /var/run/sendmail/sm-client.pid
should use /var/run/sendmail/sendmail.pid and /var/run/sendmail/sm-client.pid
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: initscripts (Show other bugs)
9
All Linux
medium Severity medium
: ---
: ---
Assigned To: Bill Nottingham
Brock Organ
bzcl34nup
:
Depends On:
Blocks: FC5Target
  Show dependency treegraph
 
Reported: 2004-10-01 13:52 EDT by Russell Coker
Modified: 2014-03-16 22:48 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-06-10 10:43:43 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Russell Coker 2004-10-01 13:52:49 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (compatible; Konqueror/3.3; Linux) (KHTML, like Gecko)

Description of problem:
There are five lines of shell script in /etc/init.d/sendmail to set the correct ownership on /var/run/sm-client.pid.  It would be a lot easier to manage if there was a directory /var/run/sendmail/ which was writable by user smmsp.  It would be easier for SE Linux to manage and more secure too (avoids the problem of a rogue daemon being used to create a pidfile for a DOS attack).

A /var/run/sendmail/ directory will make scripts simpler, make the system more secure, and generally be good in every way.

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
ls -l /var/run

Additional info:
Comment 1 Thomas Woerner 2004-10-08 06:33:11 EDT
This is not possible with the actual daemon function from
/etc/init.d/functions.

Assigning to initscripts for now.
Comment 2 Bill Nottingham 2004-10-08 12:05:55 EDT
Not expecting to look at this for FC3.
Comment 3 Miloslav Trmač 2006-02-01 13:07:52 EST
initscripts-8.22-1 support storing the pid file in a different place.
Comment 4 Russell Coker 2006-03-27 00:29:19 EST
killproc doesn't yet support a different name for the pidfile, so I'll assign 
it to initscripts again. 
Comment 5 Miloslav Trmač 2006-03-27 08:07:07 EST
(killproc -p /var/run/sm-client.pid sendmail)

What is missing?
Comment 6 Thomas Woerner 2006-03-27 09:01:28 EST
killproc is not able to use find pid files in /var/run/*/ ...
Comment 7 Miloslav Trmač 2006-03-27 09:20:31 EST
Oh, it can use the pid file, but it ignores -p when removing it.  Thanks, fixed
in CVS.
Comment 8 Miloslav Trmač 2006-04-18 19:49:25 EDT
initscripts-8.32-1 has the fixed killproc.
Comment 9 Thomas Woerner 2006-07-11 10:12:36 EDT
There is still a problem with killproc:

If I do not specify the pid_file, sendmail is killed even if the pid file is not
there or empty (works for pid files in /var/run).

If I specify a pid file for killproc, which is needed if the pid file is located
in /var/run/sendmail, and the file does not exist or is empty, killproc does not
try to kill sendmail at all.

Assigning to initscripts for now. Please reassign, if it is solved in initscipts.
Comment 10 Miloslav Trmač 2006-07-28 12:49:40 EDT
Thomas, why is that a problem?

Not killing random sendmail processes run by unprivileged users is a feature,
IMHO.
Comment 11 Thomas Woerner 2006-07-30 09:41:37 EDT
I'd like to have a killproc which behaves the same for pid files in /var/run and
/var/run/XYZ. sendmail is using the call without the pid file in the init script
for sendmail and sm-client. I'd like to have the same behaviour with the pid
files in /var/run/sendmail, maybe with an option to killproc, where i can
specify that the pid file is in sub-dir sendmail of /var/run.
Comment 12 Miloslav Trmač 2006-11-11 17:28:51 EST
Returning to this...

Thomas, I understand you want to be conservative, but I wonder whether it is
worth adding another option.

I actually think that init.d/sendmail needs the changed killproc behavior
(checking only the pid file) rather than the original (defaulting to using
pidof), because pidof can't distinguish between the sendmail and sm-client
processes (the process name of both is "sendmail").

Is there a real risk of runaway sendmail child processes that aren't recorded in
the pid files?
Comment 13 Bug Zapper 2008-04-03 11:40:46 EDT
Based on the date this bug was created, it appears to have been reported
against rawhide during the development of a Fedora release that is no
longer maintained. In order to refocus our efforts as a project we are
flagging all of the open bugs for releases which are no longer
maintained. If this bug remains in NEEDINFO thirty (30) days from now,
we will automatically close it.

If you can reproduce this bug in a maintained Fedora version (7, 8, or
rawhide), please change this bug to the respective version and change
the status to ASSIGNED. (If you're unable to change the bug's version
or status, add a comment to the bug and someone will change it for you.)

Thanks for your help, and we apologize again that we haven't handled
these issues to this point.

The process we're following is outlined here:
http://fedoraproject.org/wiki/BugZappers/F9CleanUp

We will be following the process here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping to ensure this
doesn't happen again.
Comment 14 Russell Coker 2008-04-03 18:51:48 EDT
The same code is in /etc/init.d/sendmail in Fedora 8 and the same issue 
applies.
Comment 15 Bug Zapper 2008-05-13 21:57:21 EDT
Changing version to '9' as part of upcoming Fedora 9 GA.
More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 16 Bug Zapper 2009-06-09 17:59:04 EDT
This message is a reminder that Fedora 9 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 9.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '9'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 9's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 9 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 17 Bill Nottingham 2009-06-10 10:43:43 EDT
killproc allows specifying an alternate pid file, so this should work.

Note You need to log in before you can comment on or make changes to this bug.