[DGD] Second auto and kfuns
Mikael Lind
z94lind at mtek.chalmers.se
Mon Feb 11 13:39:02 CET 2002
Quoting Noah Lee Gibbs from 00:59, 2002-02-10:
> I know you can, with the Kernel MUDLib, define a "second AUTO" by saying
> "inherit AUTO" in the /include/std.h file. I originally saw it as
> "#include AUTO", but I'm assuming that inheritance will do a similar
> trick.
You would not want to put any inherit statements in /include/std.h,
as this is included by code in /kernel and ~System. Instead, the
inherit statement should be found in the object-specific include file
specified by your object manager, through the path_special() hook.
> Either way, I'm curious whether you're allowed to have a second AUTO that
> modifies or overrides functions from the first AUTO. Obviously nomask
> functions can't be touched, but could you add simple "find_object" and
> "destruct_object" commands that allow objects to be found with a new kind
> of string specifier, for instance?
You are indeed allowed to override functions in your System-level
auto object. I assume that this was one of the main purposes of
introducing support for object-specific include files.
> I haven't had any luck doing this the obvious way and just adding a
> find_object call in the second AUTO, but I might just be messing something
> up... I'm also testing it currently using regular inheritance, and I
> don't know if inheritance of the path_special is somehow -- well --
> special :-)
Have you made sure that you are actually inheriting the System-level
auto object? It should not make a difference whether you are
inheriting it implicitly or explicitly.
> Also, if a program explicitly does an "inherit AUTO", will that be seen
> and handled by path_special in the objectd? If not, I guess you could
> still do security by just making sure to forbid_inherit() people doing
> that illegally...
No, inheritance never results in a call to path_special(). See
path_include() in /kernel/sys/driver.c for details.
// Mikael / Elemel
--
I wished for 4 uncursed scrolls of gold detection
and all I got was this lousy .signature
_________________________________________________________________
List config page: http://list.imaginary.com/mailman/listinfo/dgd
More information about the DGD
mailing list