Zesstra | 19d4cd4 | 2021-05-07 09:49:10 +0200 | [diff] [blame^] | 1 | SYNOPSIS |
| 2 | #include <sys/driver_hooks.h> |
| 3 | |
| 4 | set_driver_hook(H_LWOBJECT_UIDS, value) |
| 5 | |
| 6 | <value> being: |
| 7 | |
| 8 | mixed <closure>(object blueprint) |
| 9 | |
| 10 | DESCRIPTION |
| 11 | Mandatory hook to determine the uid and euid of a lightweight |
| 12 | object. Hook setting can be any closure. |
| 13 | |
| 14 | When a lightweight object is created, the H_LWOBJECT_UIDS hook |
| 15 | is called with the blueprint object as its argument. |
| 16 | |
| 17 | For the result, the following possibilities exist (<num> is |
| 18 | a non-zero number, <no-string> is anything but a string): |
| 19 | |
| 20 | "<uid>" -> uid = "<uid>", euid = "<uid>" |
| 21 | ({ "<uid>", "<euid>" }) -> uid = "<uid>", euid = "<euid>" |
| 22 | ({ "<uid>", <no-string> }) -> uid = "<uid>", euid = 0 |
| 23 | |
| 24 | If strict-euids is not active, the following results are |
| 25 | possible, too: |
| 26 | |
| 27 | <num> -> uid = 0, euid = 0 |
| 28 | ({ <num>, "<euid>" }) -> uid = 0, euid = "<euid>" |
| 29 | ({ <num>, <no-string> }) -> uid = 0, euid = 0 |
| 30 | |
| 31 | HISTORY |
| 32 | LDMud 3.6.5 introduced lightweight objects. |
| 33 | |
| 34 | SEE ALSO |
| 35 | hooks(C), uids(C), load_uids(H), clone_uids(H) |