[Yarv-devel] Prevent operations in yarv

Aureliano Calvo aurelianocalvo at yahoo.com.ar
Mon Oct 24 22:33:35 EDT 2005


Is there a way to modify the YARV instruction sequence
in runtime? I would like to modify the instructions of
an eval statement.

Is this feature implemented or is on the to do list?

Thank's in advance,
Aureliano.

> 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
> 



	


	
		
___________________________________________________________ 
1GB gratis, Antivirus y Antispam 
Correo Yahoo!, el mejor correo web del mundo 
http://correo.yahoo.com.ar 



More information about the Yarv-devel mailing list