author | Norm Jacobs <Norm.Jacobs@Oracle.COM> |
Mon, 27 Apr 2015 10:19:50 -0500 | |
changeset 4196 | d697072a92f5 |
parent 1079 | components/ksh93/patches/CR7128313.patch@f86b9f7aa5e7 |
permissions | -rw-r--r-- |
1079
f86b9f7aa5e7
15765108 SUNBT7128313 ksh93 executes subshell with bad path to command
Rohith Ramesh - Sun Microsystems - Bangalore India <rohith.ramesh@oracle.com>
parents:
diff
changeset
|
1 |
--- a/src/cmd/ksh93/sh/path.c |
f86b9f7aa5e7
15765108 SUNBT7128313 ksh93 executes subshell with bad path to command
Rohith Ramesh - Sun Microsystems - Bangalore India <rohith.ramesh@oracle.com>
parents:
diff
changeset
|
2 |
+++ b/src/cmd/ksh93/sh/path.c |
f86b9f7aa5e7
15765108 SUNBT7128313 ksh93 executes subshell with bad path to command
Rohith Ramesh - Sun Microsystems - Bangalore India <rohith.ramesh@oracle.com>
parents:
diff
changeset
|
3 |
@@ -1761,6 +1761,7 @@ |
f86b9f7aa5e7
15765108 SUNBT7128313 ksh93 executes subshell with bad path to command
Rohith Ramesh - Sun Microsystems - Bangalore India <rohith.ramesh@oracle.com>
parents:
diff
changeset
|
4 |
char *ptr; |
f86b9f7aa5e7
15765108 SUNBT7128313 ksh93 executes subshell with bad path to command
Rohith Ramesh - Sun Microsystems - Bangalore India <rohith.ramesh@oracle.com>
parents:
diff
changeset
|
5 |
if(!pp) |
f86b9f7aa5e7
15765108 SUNBT7128313 ksh93 executes subshell with bad path to command
Rohith Ramesh - Sun Microsystems - Bangalore India <rohith.ramesh@oracle.com>
parents:
diff
changeset
|
6 |
return(NULL); |
f86b9f7aa5e7
15765108 SUNBT7128313 ksh93 executes subshell with bad path to command
Rohith Ramesh - Sun Microsystems - Bangalore India <rohith.ramesh@oracle.com>
parents:
diff
changeset
|
7 |
+ pp->shp->last_table = 0; |
f86b9f7aa5e7
15765108 SUNBT7128313 ksh93 executes subshell with bad path to command
Rohith Ramesh - Sun Microsystems - Bangalore India <rohith.ramesh@oracle.com>
parents:
diff
changeset
|
8 |
path_nextcomp(pp->shp,pp,nv_name(np),pp); |
f86b9f7aa5e7
15765108 SUNBT7128313 ksh93 executes subshell with bad path to command
Rohith Ramesh - Sun Microsystems - Bangalore India <rohith.ramesh@oracle.com>
parents:
diff
changeset
|
9 |
ptr = stakfreeze(0); |
f86b9f7aa5e7
15765108 SUNBT7128313 ksh93 executes subshell with bad path to command
Rohith Ramesh - Sun Microsystems - Bangalore India <rohith.ramesh@oracle.com>
parents:
diff
changeset
|
10 |
return(ptr+PATH_OFFSET); |