Bug 134363 - should use /var/run/sendmail/sendmail.pid and /var/run/sendmail/sm-client.pid
Summary: should use /var/run/sendmail/sendmail.pid and /var/run/sendmail/sm-client.pid
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: initscripts
Version: 9
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact: Brock Organ
URL:
Whiteboard: bzcl34nup
Depends On:
Blocks: FC5Target
TreeView+ depends on / blocked
 
Reported: 2004-10-01 17:52 UTC by Russell Coker
Modified: 2014-03-17 02:48 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-06-10 14:43:43 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Russell Coker 2004-10-01 17:52:49 UTC
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 10:33:11 UTC
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 16:05:55 UTC
Not expecting to look at this for FC3.

Comment 3 Miloslav Trmač 2006-02-01 18:07:52 UTC
initscripts-8.22-1 support storing the pid file in a different place.

Comment 4 Russell Coker 2006-03-27 05:29:19 UTC
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 13:07:07 UTC
(killproc -p /var/run/sm-client.pid sendmail)

What is missing?

Comment 6 Thomas Woerner 2006-03-27 14:01:28 UTC
killproc is not able to use find pid files in /var/run/*/ ...

Comment 7 Miloslav Trmač 2006-03-27 14:20:31 UTC
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 23:49:25 UTC
initscripts-8.32-1 has the fixed killproc.

Comment 9 Thomas Woerner 2006-07-11 14:12:36 UTC
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 16:49:40 UTC
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 13:41:37 UTC
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 22:28:51 UTC
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 15:40:46 UTC
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 22:51:48 UTC
The same code is in /etc/init.d/sendmail in Fedora 8 and the same issue 
applies.

Comment 15 Bug Zapper 2008-05-14 01:57:21 UTC
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 21:59:04 UTC
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 14:43:43 UTC
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.