Bug 120711

Summary: dc_client fails to create pid file
Product: [Fedora] Fedora Reporter: Kaj J. Niemi <kajtzu>
Component: distcacheAssignee: Joe Orton <jorton>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: rawhide   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 1.4.5-2 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-04-13 13:20:59 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Kaj J. Niemi 2004-04-13 12:53:57 UTC
Description of problem:
By default, dc_client attemtps to create /var/run/dc_client.pid as
nobody. This doesn't work as as /var/run is not writeable by any
others than root.

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

How reproducible:
Always

Steps to Reproduce:
1. /sbin/service dc_client start
or
1. "/usr/bin/dc_client -pidfile /var/run/distcache/dc_client.pid
-listen UNIX:/var/cache/mod_ssl/distcache -sockowner apache -sockperms
0600 -user nobody -server IP:localhost:5555"
3. ps ax|grep dc_client
3.
  
Actual results:
Nothing there

Expected results:
Should work

Additional info:
I guess the easiest thing would be to create /var/run/distcache and
let nobody:nobody write to it. Alternatively the pid file creation
could be moved to an earlier point in the code but I'm not sure if
that is smart.

Comment 1 Kaj J. Niemi 2004-04-13 13:00:52 UTC
It is worth to note that dc_server does not suffer from the same problem.

Comment 2 Joe Orton 2004-04-13 13:06:56 UTC
Thanks for the report; this is a regression since 0.4.x.  Yes, it
should just write the pidfile before going setuid nobody, it's a
simple fix.

Comment 3 Joe Orton 2004-04-13 13:20:59 UTC
Fixed in 1.4.5-2.