components/ksh93/patches/CR7033181.patch
author Rohith Ramesh Bangalore India <rohith.ramesh@oracle.com>
Mon, 18 Feb 2013 01:17:35 -0600
branchs11u1-sru
changeset 2497 43014bd244d4
parent 805 23c55a2f8a8e
permissions -rw-r--r--
15765108 SUNBT7128313 ksh93 executes subshell with bad path to command

--- a/src/cmd/ksh93/bltins/typeset.c	Fri Dec 31 00:15:57 2010
+++ b/src/cmd/ksh93/bltins/typeset.c	Tue Jun 28 13:59:53 2011
@@ -608,7 +608,7 @@
 			}
 			if(!nv_isarray(np) && !strchr(name,'=') && !(shp->envlist  && nv_onlist(shp->envlist,name)))
 			{
-				if(comvar || (shp->last_root==shp->var_tree && (tp->tp || (!shp->st.real_fun && (nvflags&NV_STATIC)) || (!(flag&NV_EXPORT) && nv_isattr(np,(NV_EXPORT|NV_IMPORT))==(NV_EXPORT|NV_IMPORT)))))
+				if(comvar || (shp->last_root==shp->var_tree && (tp->tp || (!shp->st.real_fun && (nvflags&NV_STATIC)) || (!(flag&(NV_EXPORT|NV_RDONLY)) && nv_isattr(np,(NV_EXPORT|NV_IMPORT))==(NV_EXPORT|NV_IMPORT)))))
 {
 					_nv_unset(np,0);
 }