bash/bash-4.3-select-readonly.patch

13 lines
480 B
Diff
Raw Normal View History

diff -up bash-4.3/builtins/read.def.old bash-4.3/builtins/read.def
--- bash-4.3/builtins/read.def.old 2015-07-15 11:12:13.884695357 +0200
+++ bash-4.3/builtins/read.def 2015-07-15 11:10:55.339537361 +0200
@@ -794,6 +794,8 @@ assign_vars:
else
var = bind_variable ("REPLY", input_string, 0);
VUNSETATTR (var, att_invisible);
+ if (readonly_p (var) || noassign_p (var))
+ retval = EXECUTION_FAILURE;
xfree (input_string);
return (retval);