Skip to content

Commit

Permalink
fix(nfs): include also entries from /usr/lib/{passwd,group}
Browse files Browse the repository at this point in the history
as those paths are used by bootc instead of the /etc ones.

(cherry picked from commit 45cdf3c4f24f77f04b264a7747f115d1031b2e67 from PR#573)

Resolves: RHEL-52326
  • Loading branch information
pvalena committed Aug 11, 2024
1 parent 86ce704 commit 444a3b4
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions modules.d/95nfs/module-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,16 @@ install() {

# Rather than copy the passwd file in, just set a user for rpcbind
# We'll save the state and restart the daemon from the root anyway
grep -E '^nfsnobody:|^rpc:|^rpcuser:' "$dracutsysrootdir"/etc/passwd >> "$initdir/etc/passwd"
grep -E '^nogroup:|^rpc:|^nobody:' "$dracutsysrootdir"/etc/group >> "$initdir/etc/group"

local _confdir
for _confdir in etc usr/lib; do

grep -sE '^(nfsnobody|_rpc|rpc|rpcuser):' "${dracutsysrootdir}/${_confdir}/passwd" \
>> "$initdir/${_confdir}/passwd"

grep -sE '^(nogroup|rpc|nobody):' "${dracutsysrootdir}/${_confdir}/group" \
>> "$initdir/${_confdir}/group"
done

# rpc user needs to be able to write to this directory to save the warmstart
# file
Expand Down

0 comments on commit 444a3b4

Please sign in to comment.