Wind River Support Network

HomeDefectsLIN5-6541
Fixed

LIN5-6541 : wrlinux 5.0.1. - nfscommon-create_directories

Created: Oct 3, 2013    Updated: Dec 19, 2017
Resolved Date: Oct 30, 2013
Found In Version: 5.0.1
Fix Version: 5.0.1.9
Severity: Severe
Applicable for: Wind River Linux 5
Component/s: Userspace

Description

in wrlinux 5.0.1.

there is a bug in the nfs script for the create_directories function where the wrong state file is being checked

create_directories(){
	echo -n 'creating NFS state directory: '
	mkdir -p "$NFS_STATEDIR"
	(	cd "$NFS_STATEDIR"
		umask 077
		mkdir -p sm sm.bak
		test -w sm/state || {
			rm -f sm/state
			:>sm/state
		}
		
according to the sm-notify's man page:
FILES
       /var/lib/nfs/sm          directory containing monitor list
       /var/lib/nfs/sm.bak      directory containing notify list
       /var/lib/nfs/state       NSM state number for this host

also, the owner of the sm and sm.bak directories would need to be set as by default, the script creates the directories with root as owner.
It should be rpcuser

Workaround

--- rootfs-orig/etc/init.d/nfscommon
+++ rootfs/etc/init.d/nfscommon
@@ -83,6 +83,7 @@ create_directories(){
 		umask 077
 		mkdir -p rpc_pipefs
 		mkdir -p sm sm.bak
+		chown rpcuser sm sm.bak
 		test -w sm/state || {
 			rm -f sm/state
 			:>sm/state
@@ -96,6 +97,7 @@ create_directories(){
 			}
 		done
 	)
+	chown rpcuser "$NFS_STATEDIR"
 	echo done
 }
 

Steps to Reproduce

check nfscommon script

Other Downloads


Live chat
Online