Bug 495066 - rpc.statd is running as root
rpc.statd is running as root
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: nfs-utils (Show other bugs)
5.3
All Linux
low Severity medium
: rc
: ---
Assigned To: Steve Dickson
yanfu,wang
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-04-09 11:01 EDT by isakmt
Modified: 2011-07-21 07:24 EDT (History)
0 users

See Also:
Fixed In Version: nfs-utils-1.0.9-52.el5
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-07-21 07:24:49 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


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

  None (edit)
Description isakmt 2009-04-09 11:01:34 EDT
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 11:10:12 EDT
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 01:28:18 EDT
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 07:24:49 EDT
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.