Bug 1438502
Summary: | Wrong directory path specified for rpc user | |||
---|---|---|---|---|
Product: | Red Hat Enterprise Linux 6 | Reporter: | Freddy E. Montero <fmontero> | |
Component: | rpcbind | Assignee: | Steve Dickson <steved> | |
Status: | CLOSED WONTFIX | QA Contact: | Yongcheng Yang <yoyang> | |
Severity: | medium | Docs Contact: | ||
Priority: | high | |||
Version: | 6.9 | CC: | chunwang, dwysocha, eguan, fmontero, jiyin, joedward, rhandlin, rmj, snavale, steved, swhiteho, xzhou, yoyang | |
Target Milestone: | rc | Keywords: | EasyFix | |
Target Release: | --- | |||
Hardware: | x86_64 | |||
OS: | Linux | |||
Whiteboard: | ||||
Fixed In Version: | Doc Type: | If docs needed, set a value | ||
Doc Text: | Story Points: | --- | ||
Clone Of: | ||||
: | 1628901 (view as bug list) | Environment: | ||
Last Closed: | 2017-12-11 16:03:05 UTC | Type: | Bug | |
Regression: | --- | Mount Type: | --- | |
Documentation: | --- | CRM: | ||
Verified Versions: | Category: | --- | ||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | ||
Cloudforms Team: | --- | Target Upstream Version: | ||
Embargoed: | ||||
Bug Depends On: | ||||
Bug Blocks: | 1461138, 1507140 |
Description
Freddy E. Montero
2017-04-03 14:53:42 UTC
(In reply to Freddy E. Montero from comment #0) > Description of problem: > On the latest version of RHEL 6 (v9), the rpcbind rpm creates an rpc user > with directory path "/var/lib/rpcbind" but this directory path does not get > created when the rpm is installed. > The old directory path "/var/cache/rpcbind" gets created instead. > > Looking at spec file for (rpcbind-0.2.0-13) the old path still listed: > mkdir -p %{buildroot}/var/cache/rpcbind > > Version-Release number of selected component (if applicable): > rpcbind-0.2.0-13.el6.x86_64 > > How reproducible: > Reproducible every time. > Easy to reproduce with rpcbind-0.2.0-13. Same test on RHEL-7 shows this problem may not exist on them: - RHEL-6.9 + rpcbind-0.2.0-13 [root@~ ~]# rpm -qa |grep rpcbind rpcbind-0.2.0-13.el6.x86_64 [root@~ ~]# cat /etc/passwd|grep rpc rpc:x:32:32:Rpcbind Daemon:/var/lib/rpcbind:/sbin/nologin rpcuser:x:29:29:RPC Service User:/var/lib/nfs:/sbin/nologin [root@~ ~]# test -d /var/lib/rpcbind;echo $? 1 - RHEL-7.4 nightly + rpcbind-0.2.0-39.el7.x86_64 [root@~ ~]# rpm -qa |grep rpcbind rpcbind-0.2.0-39.el7.x86_64 [root@~ ~]# cat /etc/passwd|grep rpc rpc:x:32:32:Rpcbind Daemon:/var/lib/rpcbind:/sbin/nologin rpcuser:x:29:29:RPC Service User:/var/lib/nfs:/sbin/nologin [root@~ ~]# test -d /var/lib/rpcbind;echo $? 0 *** Bug 1439832 has been marked as a duplicate of this bug. *** I guess I don't understand what the problem is... rpcbind used a new cache directory but the same home directory for the rpc account. Why is that a problem? The issue in the rpcbind rpm is that the rpm does not contain a /var/lib/rpcbind nor does the specfile create one - %files %defattr(-,root,root) %doc AUTHORS ChangeLog README /sbin/rpcbind %{_sbindir}/rpcinfo %{_mandir}/man8/* %config %{_initddir}/rpcbind %dir %attr(700,rpc,rpc) /var/cache/rpcbind however the rpcbind user is created with a home directory of /var/lib/rpcbind .. # Softly static allocate the rpc uid and gid. getent group rpc >/dev/null || groupadd -f -g 32 -r rpc if ! getent passwd rpc >/dev/null ; then if ! getent passwd 32 >/dev/null ; then useradd -l -c "Rpcbind Daemon" -d /var/lib/rpcbind \ -g rpc -M -s /sbin/nologin -o -u 32 rpc > /dev/null 2>&1 else useradd -l -c "Rpcbind Daemon" -d /var/lib/rpcbind \ -g rpc -M -s /sbin/nologin rpc > /dev/null 2>&1 fi fi regardless if rpcbind chooses to cache in /var/cache/rpcbind or /var/lib/rpcbind - or if both are created - the /var/lib/rpcbind directory should either be created or the useradd should be adjusted to point to the cache dir simply fix the specfile and/or the rpm (In reply to Jonathan Edwards from comment #7) > > # Softly static allocate the rpc uid and gid. > getent group rpc >/dev/null || groupadd -f -g 32 -r rpc > if ! getent passwd rpc >/dev/null ; then > if ! getent passwd 32 >/dev/null ; then > useradd -l -c "Rpcbind Daemon" -d /var/lib/rpcbind \ > -g rpc -M -s /sbin/nologin -o -u 32 rpc > /dev/null 2>&1 > else > useradd -l -c "Rpcbind Daemon" -d /var/lib/rpcbind \ > -g rpc -M -s /sbin/nologin rpc > /dev/null 2>&1 > fi > fi > > > regardless if rpcbind chooses to cache in /var/cache/rpcbind or > /var/lib/rpcbind - or if both are created - the /var/lib/rpcbind directory > should either be created or the useradd should be adjusted to point to the > cache dir > > simply fix the specfile and/or the rpm What I don't understand is why /var/lib/rpcbind is not being created. Looking at useradd(8) the '-d' should be creating the directory "The new user will be created using HOME_DIR as the value for the user." and it usually does.. I guess the logic behind using both /var/cache and /var/lib is caches are not stable (aka they can be removed) which is not the case with home directories... They need to be stable. SteveD, what is the status on this one? We need to decide what we need to do here. I don't see a problem here... devel nacking Development Management has reviewed and declined this request. You may appeal this decision by reopening this request. |