security is up and running
"Mark Hahn" <[email protected]> Tue, 6 Apr 2004 01:16:09 -0700
| Newsgroups | gmane.comp.lang.prothon.devel |
|---|---|
| Message-ID | <[email protected]> |
Build 190 has pretty decent security up and running. You are liable to get a few permission exceptions for a while until we get things ironed out. When you find a place the throws an exception that you don't agree with, you can put su(i); and un_su(i); statements around the code that has the problem. These stand for "superuser" and "un-superuser" and will give your thread temporary system access level status. This is actually not a kludge. There are places where the code legally needs to modify system objects. You can search for existing uses of su(i) to see examples. I set the File object to have access level of user1 to block guests from file access and that works while file_test.pr still works at user2 level. I set console to run at user2. You will get a permission exception if you do something nasty like: del Sys.path But Sys.path += "c:\home" also fails and this is a problem because it is pretty common practice to modify Sys.path in programs. Maybe we'll allow user2 to modify it but not user1. Right now you cannot import in the console or application, but you can in the init.pth file, because it runs at system level. Importing involves loading things into Object. Again maybe we'll only allow user2 to do imports. I got the security idea in the morning and had it in and working before bedtime. Not bad for a day's work.