Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > gnu.bash.bug > #11252
| From | isabella parakiss <izaberina@gmail.com> |
|---|---|
| Newsgroups | gnu.bash.bug |
| Subject | cannot declare local variables if they're readonly |
| Date | 2015-07-23 01:12 +0200 |
| Message-ID | <mailman.7287.1437606729.904.bug-bash@gnu.org> (permalink) |
>From variables.c
The test against old_var's context
level is to disallow local copies of readonly global variables (since I
believe that this could be a security hole).
Can you please explain how that can be a security hole?
$ readonly wtf; fn () { local wtf; }; fn
bash: local: wtf: readonly variable
You can't even be sure that you can set *local* variables in a function.
This is a problem.
Most of the shells that support local variables (ksh93, mksh, zsh, dash...)
allow this. The only one I could find that doesn't is busybox.
---
xoxo iza
Back to gnu.bash.bug | Previous | Next | Find similar
cannot declare local variables if they're readonly isabella parakiss <izaberina@gmail.com> - 2015-07-23 01:12 +0200
csiph-web