From: Florian Gross Date: 2004-12-29T01:41:47+09:00 Subject: Re: Restricting file access in Ruby John Allen wrote: > Hey, I don't know if this is a subject that's been beat to death or not as > I'm new to the group, but I wanted to ask whether anyone's extended Ruby to > allow scripts to (dis)allow access to files based on some sort of user > defined mechanism. > > [...] > > I've been reading through the code in the ruby-1.8.2 source tree, and I'm > learning how it's all tied together. I guess my question is where to put > my checks. Also, I feel funny even suggesting this because it seems to go > against everything I've read about Ruby making things less complicated and > bloated. I'd suggest using $SAFE and having a custom interface for doing IO that goes through your special privilege checks. But you might be right in that patching Ruby for this would make security breaches less likely.