aboutsummaryrefslogtreecommitdiff
path: root/shell/ash.c
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2021-06-06 12:07:11 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2021-06-06 12:08:43 +0200
commit457825f77a7c7286647ee888a1000a6bb12ca8fc (patch)
treef4deac5510cbae6299b964f48d4c8cad8bde3ce4 /shell/ash.c
parenta1b0d3856d9a0419cb74bf4c87525265871b5868 (diff)
downloadbusybox-w32-457825f77a7c7286647ee888a1000a6bb12ca8fc.tar.gz
busybox-w32-457825f77a7c7286647ee888a1000a6bb12ca8fc.tar.bz2
busybox-w32-457825f77a7c7286647ee888a1000a6bb12ca8fc.zip
shells: do not allow bare "read" in non-bash compat configs
On Sat, Feb 9, 2019 Cristian Ionescu-Idbohrn wrote: > In my case (at work), I have to watch and prevent people from doing > unportable things. For me, that's a burden. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'shell/ash.c')
-rw-r--r--shell/ash.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/shell/ash.c b/shell/ash.c
index 05c47950f..bcf7a3470 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -14161,6 +14161,10 @@ readcmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
14161 } 14161 }
14162 } 14162 }
14163 14163
14164 if (!ENABLE_ASH_BASH_COMPAT && !argptr) {
14165 bb_simple_error_msg("read: need variable name");
14166 return 1;
14167 }
14164 params.argv = argptr; 14168 params.argv = argptr;
14165 params.setvar = setvar0; 14169 params.setvar = setvar0;
14166 params.ifs = bltinlookup("IFS"); /* can be NULL */ 14170 params.ifs = bltinlookup("IFS"); /* can be NULL */