[Yarv-devel] Prevent operations in yarv
SASADA Koichi
ko1 at atdot.net
Mon Oct 24 20:01:31 EDT 2005
Hi,
I want to support re-writing instruction sequence on Ruby level.
ex)
[ruby program] ->
YARV compiler ->
[YARV instruction sequence (base)] ->
Ruby program (you can add it) ->
[YARV instruction sequence (changed)]
Using this feature, I think you can make security manager. Of course,
you must know YARV instruction set.
Aureliano Calvo wrote:
> Hi all,
> I'm trying to implement a security manager for ruby
> like the java security manager. In order to achieve
> it, I need to be able to selectively prevent some
> things to ocurr:
>
> * Method definition
> * Method undefinition
> * Method redefinition
> * Constant definition
> * Constant modification
> * Constant undefinition
> * Module/Class definition
> * Module/Class modification
> * Module/Class undefinition
>
> I've tried to implement a "pure ruby" solution, but
> I've found that it's impossible to prevent the
> definition, redefinition and undefinition of a
> constant and it's very very tricky to prevent the
> other operations (for instance method redefinition can
> be prevented by aliasing every method and overloading
> the method_added method to go back to the original
> implementation).
>
> What would be nice is for ruby to have built in
> something like the feature described in
> http://www.rubygarden.org/ruby?EventOrientedRuby.
>
> Is it supported by yarv/rite?
>
> Can something like it be implemented with a "pure
> jarv" solution? (i.e. without modifying the
> interpreter or adding C modules).
>
> Thank you very much for your time,
> Aureliano.
>
>
>
>
>
>
>
> ___________________________________________________________
> 1GB gratis, Antivirus y Antispam
> Correo Yahoo!, el mejor correo web del mundo
> http://correo.yahoo.com.ar
>
--
SASADA Koichi at atdot dot net
More information about the Yarv-devel
mailing list