MG Mud User | 88f1247 | 2016-06-24 23:31:02 +0200 | [diff] [blame^] | 1 | SYNOPSIS |
| 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 | |
| 10 | DESCRIPTION |
| 11 | Mandatory hooks to determine the uid and euid of cloned |
| 12 | objects. Hook settings can be any closure. |
| 13 | |
| 14 | When an object is cloned, the H_CLONE_UIDS hook is called with |
| 15 | the blueprint object as first and the clone's designated name |
| 16 | as second argument. The new object already exists, but has 0 |
| 17 | uids. |
| 18 | |
| 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 | |
| 33 | HISTORY |
| 34 | |
| 35 | SEE ALSO |
| 36 | hooks(C), uids(C), load_uids(H) |