Bug 495066 - rpc.statd is running as root
Summary: rpc.statd is running as root
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: nfs-utils
Version: 5.3
Hardware: All
OS: Linux
low
medium
Target Milestone: rc
: ---
Assignee: Steve Dickson
QA Contact: yanfu,wang
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-04-09 15:01 UTC by isakmt
Modified: 2018-11-14 12:09 UTC (History)
0 users

Fixed In Version: nfs-utils-1.0.9-52.el5
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-07-21 11:24:49 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
patch for nfs-utils.spec (398 bytes, patch)
2009-04-09 15:10 UTC, isakmt
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:1048 0 normal SHIPPED_LIVE nfs-utils bug fix and enhancement update 2011-07-20 15:43:36 UTC

Description isakmt 2009-04-09 15:01:34 UTC
Description of problem:

rpc.statd is running as root after installing nfs-utils rpm.

Before installing nfs-utils package, "/var/lib/nfs/statd/sm" directory is
not exist. rpc.statd does mkdir the directory when first starting of
/etc/init.d/nfslock. Because the dir's owner is root, rpc.statd does
not drop root privilege and outputs warning message to syslog.

"statd running as root. chown  to choose different user"


Steps to Reproduce:
1.If you already install nfs-utils, erace it.
   # rpm -e nfs-utils
2.Install nfs-utils rpm.
3. # /etc/init.d/nfslock start
4. # ps -fp `cat /var/run/rpc.statd.pid`
5.See UID of rpc.statd
  
Actual results:
UID is root.

Expected results:
UID is rpcuser.

Comment 1 isakmt 2009-04-09 15:10:12 UTC
Created attachment 338929 [details]
patch for nfs-utils.spec

mkdir sm dir and chown it in postinstall script 
prevents rpc.statd from mkdir the directory 
with root privilege.

Comment 3 yanfu,wang 2011-05-16 05:28:18 UTC
reproduced on nfs-utils-1.0.9-51.el5 using comment #0:
[root@hp-dl2x170g6-01 ~]# ps -fp `cat /var/run/rpc.statd.pid`
UID        PID  PPID  C STIME TTY          TIME CMD
root      4095     1  0 01:15 ?        00:00:00 rpc.statd

# vim /var/log/messages 
...
May 16 01:18:32 hp-dl2x170g6-01 rpc.statd[4179]: statd running as root. chown /var/lib/nfs/statd/sm to choose different user


verified against nfs-utils-1.0.9-52.el5 on i386 and x86_64:
[root@hp-xw6400-02 ~]# rpm -ivh nfs-utils-1.0.9-52.el5.x86_64.rpm 
Preparing...                ########################################### [100%]
	package nfs-utils-1.0.9-52.el5.x86_64 is already installed
[root@hp-xw6400-02 ~]# /etc/init.d/nfslock start
Starting NFS statd: [  OK  ]
[root@hp-xw6400-02 ~]# ps -fp `cat /var/run/rpc.statd.pid`
UID        PID  PPID  C STIME TTY          TIME CMD
rpcuser   5447     1  0 01:26 ?        00:00:00 rpc.statd

Comment 6 errata-xmlrpc 2011-07-21 11:24:49 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-1048.html


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