J
John Allen
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'm writing an application that will allow individual users to write (and
execute) their own Ruby scripts within a confined subtree of my filesystem,
and I want to basically add checks to any function that accesses files,
whether through the File class, or the Dir class, or whatever. The users
in my system are not all trusted equally, and I want to grant varying
degrees of privilege to each. I also want to restrict access to sockets
and other I/O mechanisms, but that's easier to do since all I have to do is
not make the library available.
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.
Anyway, flames or comments are appreciated.
-John
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'm writing an application that will allow individual users to write (and
execute) their own Ruby scripts within a confined subtree of my filesystem,
and I want to basically add checks to any function that accesses files,
whether through the File class, or the Dir class, or whatever. The users
in my system are not all trusted equally, and I want to grant varying
degrees of privilege to each. I also want to restrict access to sockets
and other I/O mechanisms, but that's easier to do since all I have to do is
not make the library available.
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.
Anyway, flames or comments are appreciated.
-John