You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
50 lines
1.2 KiB
50 lines
1.2 KiB
diff -ru mksh-R57/funcs.c src/funcs.c |
|
--- mksh-R57/funcs.c 2018-10-20 14:04:55.000000000 -0700 |
|
+++ src/funcs.c 2019-03-26 12:05:23.976821773 -0700 |
|
@@ -103,7 +103,9 @@ |
|
{Tsgbreak, c_brkcont}, |
|
{T__builtin, c_builtin}, |
|
{Tbuiltin, c_builtin}, |
|
+#if !defined(__ANDROID__) |
|
{Tbcat, c_cat}, |
|
+#endif |
|
{Tcd, c_cd}, |
|
/* dash compatibility hack */ |
|
{"chdir", c_cd}, |
|
@@ -126,7 +128,9 @@ |
|
{"pwd", c_pwd}, |
|
{Tread, c_read}, |
|
{Tdsgreadonly, c_typeset}, |
|
+#if !defined(__ANDROID__) |
|
{"!realpath", c_realpath}, |
|
+#endif |
|
{"~rename", c_rename}, |
|
{"*=return", c_exitreturn}, |
|
{Tsgset, c_set}, |
|
@@ -160,8 +164,10 @@ |
|
{"~printf", c_printf}, |
|
#endif |
|
#if HAVE_SELECT |
|
+#if !defined(__ANDROID__) |
|
{"sleep", c_sleep}, |
|
#endif |
|
+#endif |
|
#ifdef __MirBSD__ |
|
/* alias to "true" for historical reasons */ |
|
{"domainname", c_true}, |
|
diff -ru mksh-R57/main.c src/main.c |
|
--- mksh-R57/main.c 2019-01-05 05:24:45.000000000 -0800 |
|
+++ src/main.c 2019-03-26 12:05:23.980821764 -0700 |
|
@@ -399,6 +399,12 @@ |
|
/* import environment */ |
|
init_environ(); |
|
|
|
+ /* override default PATH regardless of environment */ |
|
+#ifdef MKSH_DEFPATH_OVERRIDE |
|
+ vp = global(TPATH); |
|
+ setstr(vp, MKSH_DEFPATH_OVERRIDE, KSH_RETURN_ERROR); |
|
+#endif |
|
+ |
|
/* for security */ |
|
typeset(TinitIFS, 0, 0, 0, 0); |
|
|
|
|