I've been having fun tinkering with a nearly from-scratch MudOS mudlib, but now I've reached the point where I need to consider mudlib security before I go any further. (I should note I'm really only concerned about file security, and not interested in the driver-provided uid and privs stuff. And shadows are disabled.)
So I have a basic question about the thing I'm basing my security on.
Objects that want file access must inherit "/secure/access", which defines a function nomask int query_access_level().
Given that, is the master's valid_write/read() function safe to do something like this:int valid_write(string file, object caller, string func)
{
int access_level;
if(!inherits("secure/access", caller)) return 0;
access_level = caller->query_access_level();
...
thinking that the query_access_level() defined in /secure/access.c must be called?
Some testing has me a little bit worried; inheriting "u/blackhat/bogus_access" (which defines query_access_level()) before inherit "secure/access" only results in a compiler warning. obj->query_access_level() still hits the right place, but this seems like a bug to me.