Re: Simple Unix Text Editor
Posted in 1993
In <2dvlbs$3r6@charm.magnus.acs.ohio-state.edu> apatanka@magnus.acs.ohio-state.edu (Atul Patankar) writes: >I made a few attempts to invoke an editor from a 4GL program sometime ago. >Our users are either "vi" or "emacs" literate, so the choice was already >made for me. I did not want the users to be able to escape to the shell >from within the editor. Setting shell to /dev/null in the users' environment >solved this for "vi". Heh. That'll stop them for about as long as $DBESC :-) [1 or 2 seconds] They just need to "set shell=/bin/csh" then do ":shell". Having created a genuinely secure mode for Nyx's menu system, let me tell you it isn't easy, and essentially involves removing any program users might want to use. (E.g., you can't use even "more".) Most shell scripts you'd invoke are likewise subject to breaking out of. By the time I'd removed all the programs that could cause problems, almost nothing was left. Now, you can tinker with the binary of 'vi' and mung the "shell" variable but, really now... >I could not find a way to do so from "emacs". "emacs" will allow you to >escape to shell if you know the path and if you have the permissions, no >matter what the environment is set to. I am a "vi" user myself and not an >"emacs" expert. Does anyone know if it is possible to block the shell escape >for "emacs"? You'd be best off hacking the source to eliminate exec()'s and system()'s. I did this for Nyx too, but still had a feeling it wasn't complete. >All help is greatly appreciated. It probably isn't worth the effort. :-) -- Andrew Burt aburt@du.edu "But if he was dying he wouldn't bother to carve "Aaaaargh", he'd just say it."