let rpc user own /var/lib/rpcbind
authorHarald Hoyer <harald@redhat.com>
Mon, 2 May 2011 09:27:12 +0000 (11:27 +0200)
committerHarald Hoyer <harald@redhat.com>
Mon, 2 May 2011 09:27:12 +0000 (11:27 +0200)
https://bugzilla.redhat.com/show_bug.cgi?id=698160

modules.d/95nfs/module-setup.sh

index ad6c257..add0adf 100755 (executable)
@@ -61,9 +61,11 @@ install() {
     egrep '^rpc:' /etc/passwd >> "$initdir/etc/passwd"
     egrep '^rpcuser:' /etc/passwd >> "$initdir/etc/passwd"
     #type -P nologin >/dev/null && dracut_install nologin
+    egrep '^rpc:' /etc/group >> "$initdir/etc/group"
 
     # rpc user needs to be able to write to this directory to save the warmstart
     # file
-    chmod 777 "$initdir/var/lib/rpcbind"
+    chmod 770 "$initdir/var/lib/rpcbind"
+    chown rpc.rpc "$initdir/var/lib/rpcbind"
 }