41 lines
1.4 KiB
Diff
41 lines
1.4 KiB
Diff
|
From e1ae840425837004bacafe53c53468207aa513e3 Mon Sep 17 00:00:00 2001
|
||
|
From: Pavel Valena <pvalena@redhat.com>
|
||
|
Date: Thu, 8 Aug 2024 00:55:03 +0200
|
||
|
Subject: [PATCH 30/31] fix(nfs): include also entries from
|
||
|
/usr/lib/{passwd,group}
|
||
|
|
||
|
as those paths are used by bootc instead of the /etc ones.
|
||
|
|
||
|
(cherry picked from commit 45cdf3c4f24f77f04b264a7747f115d1031b2e67)
|
||
|
|
||
|
Resolves: RHEL-53431
|
||
|
---
|
||
|
modules.d/95nfs/module-setup.sh | 11 +++++++++--
|
||
|
1 file changed, 9 insertions(+), 2 deletions(-)
|
||
|
|
||
|
diff --git a/modules.d/95nfs/module-setup.sh b/modules.d/95nfs/module-setup.sh
|
||
|
index da6549d1..df2d0e05 100755
|
||
|
--- a/modules.d/95nfs/module-setup.sh
|
||
|
+++ b/modules.d/95nfs/module-setup.sh
|
||
|
@@ -130,8 +130,15 @@ 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
|
||
|
|
||
|
dracut_need_initqueue
|
||
|
}
|
||
|
--
|
||
|
2.42.0
|
||
|
|