NFSv4 rpcbind should need only the rpcbind user, not the entire /etc/passwd.
authorWarren Togami <wtogami@redhat.com>
Thu, 9 Jul 2009 18:33:33 +0000 (14:33 -0400)
committerWarren Togami <wtogami@redhat.com>
Thu, 9 Jul 2009 18:33:33 +0000 (14:33 -0400)
TODO: /etc/passwd and /etc/group are not removed yet due to 90mdraid.
      dledford said he'll go in and clean this up since he has the hardware
      to actually test the mdmon stuff.

modules.d/90mdraid/install
modules.d/95nfs/install

index 9b6994119e497e2dad5fa36475895bcdbb14da20..bb6546903c5b75871e977cdc2656d408f06e17e3 100755 (executable)
@@ -1,5 +1,10 @@
 #!/bin/bash
 dracut_install mdadm
+# XXX: mdmon really needs to run as non-root?
+#      If so, write only the user it needs in the initrd's /etc/passwd (and maybe /etc/group)
+#      in a similar fashion to modules.d/95nfs.  Do not copy /etc/passwd and /etc/group from 
+#      the system into the initrd.
+#      dledford has hardware to test this, so he should be able to clean this up.
 inst /etc/passwd
 inst /etc/group
 instmods =drivers/md
index 5cf0ff6629ca134f19bc193f398b8aa91761298a..d0d0edbac66b77b56e166bc9263c50658e617a94 100755 (executable)
@@ -4,7 +4,7 @@ which rpcbind >/dev/null 2>&1 && dracut_install rpcbind
 
 dracut_install rpc.statd mount.nfs mount.nfs4 umount 
 [ -f /etc/netconfig ] && dracut_install /etc/netconfig 
-dracut_install /etc/passwd /etc/services 
+dracut_install /etc/services 
 dracut_install /etc/nsswitch.conf /etc/rpc /etc/protocols
 dracut_install rpc.idmapd /etc/idmapd.conf
 if ldd $(which rpc.idmapd) |grep -q lib64; then
@@ -26,7 +26,7 @@ mkdir -p "$initdir/var/lib/nfs/statd/sm"
 
 # 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
-#echo "rpc:x:32:32:Rpcbind:/var/lib/rpcbind:/bin/false" >> "$initdir/etc/passwd"
+echo "rpc:x:32:32:Rpcbind:/var/lib/rpcbind:/bin/false" >> "$initdir/etc/passwd"
 
 # rpc user needs to be able to write to this directory to save the warmstart
 # file