Bug 851428 - sensord creates /run/sensord.pid instead of /run/sensord/sensord.pid
Summary: sensord creates /run/sensord.pid instead of /run/sensord/sensord.pid
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: lm_sensors
Version: 18
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
Assignee: Nikola Pajkovsky
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-08-24 07:50 UTC by Miroslav Grepl
Modified: 2014-02-02 22:16 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-08-24 08:56:02 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Miroslav Grepl 2012-08-24 07:50:35 UTC
Description of problem:

sensord creates /run/sensord.pid instead of /run/sensord/sensord.pile

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

lm_sensors-sensord-3.3.2-3.fc18.x86_64

How reproducible:

# systemctl start sensord.service
# ls -lZ /run/sensord.pid 
-rw-r--r--. root root system_u:object_r:var_run_t:s0   /run/sensord.pid

Steps to Reproduce:
1. yum install lm_sensors-sensord
2. systemctl start sensord.service
  
Actual results:

sensord.pid file is placed in the /run directory

Expected results:

sensord.pid file should be placed in the /run/sensord directory. Then you can create/rename whatever you want in this directory and we won't need to update SELinux rules.

Additional info:

http://fedoraproject.org/wiki/Packaging:Tmpfiles.d

Comment 1 Hans de Goede 2012-08-24 07:59:04 UTC
I disagree, /var/run/$name.pid is the standard pid file location for daemons and has been so for ages. A lot of distros depend on this, and we used to depend on it until we moved to systemd which no longer cares about pid files. Let me quote a snipper from /etc/init.d/functions

# Set $pid to pids from /var/run* for {program}.  $pid should be declared
# local in the caller.
# Returns LSB exit code for the 'status' action.
__pids_var_run() {
        local base=${1##*/}
        local pid_file=${2:-/var/run/$base.pid}

Making the requested change means making changes to the daemon C-code, and if we then upstream these changes, they will cause issues for other distro's. I believe that a change like this, which I assume you've requested from other daemons to should first be discussed on fedora-devel, as upstreaming the necessary changes is going to be a problem.

Comment 2 Hans de Goede 2012-08-24 08:07:39 UTC
I;ve started a discussion about this on fedora-devel-list, subject: "Moving pid files from /var/run/$name.pid to /var/run/$name/$name.pid"

Comment 3 Miroslav Grepl 2012-08-24 08:36:27 UTC
I fill bugs like this if I create a new SELinux policies and I see this situation.

Basically we have no problem with /var/run/$name.pid until this path is changed or you add a sock file for example. Then there will be an issue from the SELinux point of view.

Comment 4 Ralf Corsepius 2012-08-24 08:51:31 UTC
/var/run/$name.pid is the location mandated by the FHS [1].

[1] http://www.pathname.com/fhs/pub/fhs-2.3.html#VARRUNRUNTIMEVARIABLEDATA

I do not see any reason to diverge from this long estabilished convention.

Should Red Hat have strong reasons to enforce this change, it defintely needs FESCO and FPC approval.

Comment 5 Miroslav Grepl 2012-08-24 09:01:06 UTC
It was more a question about moving of sensord.pid than a new standard.

Comment 6 Nikola Pajkovsky 2012-08-24 12:58:29 UTC
Wasn't that feature to move pid files from /var/run to /run because of systemd and its super hyper fast  boot?


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