blob: 7221dd5270ece253c89f1eb1ec4761e73f25be5f [file] [log] [blame]
MG Mud User88f12472016-06-24 23:31:02 +02001SYNOPSIS
2 #include <sys/driver_hooks.h>
3
4 set_driver_hook(H_LOAD_UIDS, value)
5
6 <value> being:
7
8 mixed <closure> (string objectname)
9
10DESCRIPTION
11 Mandatory hooks to determine the uid and euid of loaded or
Zesstra7ea4a032019-11-26 20:11:40 +010012 cloned objects. Hook settings can be any closure.
MG Mud User88f12472016-06-24 23:31:02 +020013
14 When an object is newly loaded, the H_LOAD_UIDS hook is called
Zesstra7ea4a032019-11-26 20:11:40 +010015 with the object name as argument. The new object already
MG Mud User88f12472016-06-24 23:31:02 +020016 exists, but has 0 uids.
17
18 For the result, the following possibilities exist (<num> is
19 a non-zero number, <no-string> is anything but a string):
20
21 "<uid>" -> uid = "<uid>", euid = "<uid>"
22 ({ "<uid>", "<euid>" }) -> uid = "<uid>", euid = "<euid>"
23 ({ "<uid>", <no-string> }) -> uid = "<uid>", euid = 0
24
25 If strict-euids is not active, the following results are
26 possible, too:
27
28 <num> -> uid = 0, euid = 0
29 ({ <num>, "<euid>" }) -> uid = 0, euid = "<euid>"
30 ({ <num>, <no-string> }) -> uid = 0, euid = 0
31
32HISTORY
33
34SEE ALSO
35 hooks(C), uids(C), clone_uids(H)