[DGD] Re: Undefined function hook
Mikael Lind
mikkelin at gmail.com
Mon Jul 9 11:59:49 CEST 2007
Hello again,
To answer my own question about security implications, one is that the
redefined call_other() will be considered a privileged call by the
system. Here is another attempt:
# include <kernel/kernel.h>
private string creator(string path)
{
return ::call_other(DRIVER, "creator", path);
}
static mixed call_other(mixed obj, string func, mixed args...)
{
string prog;
if (typeof(obj) == T_STRING) {
/* find or compile named object */
}
prog = function_object(func, obj);
if (prog && creator(prog) == "System") return nil;
return prog ? ::call_other(obj, func, args...)
: ::call_other(obj, "call_missing", func, args...);
}
Regards,
Mikael
More information about the DGD
mailing list