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