MG Mud User | 88f1247 | 2016-06-24 23:31:02 +0200 | [diff] [blame^] | 1 | SYNOPSIS |
| 2 | int privilege_violation(string op, mixed who, mixed arg3, mixed arg4) |
| 3 | |
| 4 | DESCRIPTION |
| 5 | Validate the execution of a privileged operation. |
| 6 | op denotes the requested operation, who is the object |
| 7 | requesting the operation (object_name or object pointer), arg3 |
| 8 | and arg4 are additional arguments, depending on the operation. |
| 9 | |
| 10 | The function should return >0 to grant the privilege, 0 to |
| 11 | indicate that the caller was probably misleaded and the error |
| 12 | might be fixed, and anything else to indicate a real |
| 13 | violation, that will be handled as run time error. |
| 14 | |
| 15 | The privileged operations are: |
| 16 | attach_erq_demon Attach the erq demon to object <arg> with |
| 17 | flag <args>. |
| 18 | bind_lambda Bind a lambda-closure to object arg3. |
| 19 | call_out_info Return an array with all call_out |
| 20 | informations. |
| 21 | nomask simul_efun Attempt to get an efun <arg> via efun:: when |
| 22 | it is shadowed by a nomask type simul_efun. |
| 23 | rename_object The object who tries to rename the object |
| 24 | arg3 to the name arg4. |
| 25 | send_udp Send UDP-data to host arg3. |
| 26 | set_auto_include_string Set the string automatically included |
| 27 | by the compiler into every object. |
| 28 | get_extra_wizinfo Get the additional wiz-list info for user |
| 29 | arg3. |
| 30 | set_extra_wizinfo Set the additional wiz-list info for user |
| 31 | arg3. |
| 32 | set_extra_wizinfo_size Set the size of the additional user |
| 33 | info in the wiz-list to arg3. |
| 34 | set_driver_hook : Set hook <arg> to <arg2>. |
| 35 | set_this_object Set this_object() to arg3. |
| 36 | shadow_add_action Add an action to function arg4 that is |
| 37 | shadowed by the object arg3. |
| 38 | symbol_variable Attempt to make a symbol from a hidden |
| 39 | inherited variable. arg3 is the object in |
| 40 | question, arg4 the number of the variable in |
| 41 | the variable table. |
| 42 | wizlist_info Return an array with all wiz-list |
| 43 | information. |
| 44 | |
| 45 | call_out_info() can return the arguments to functions and |
| 46 | lambda closures to be called by call_out(); you should |
| 47 | consider that read access to closures, mappings and arrays |
| 48 | means write access and/or other privileges. |
| 49 | wizlist_info() will return an array which holds, among others, |
| 50 | the extra wizlist field. While a toplevel array, if found, |
| 51 | will be copied, this does not apply to nested arrays or to any |
| 52 | mappings. You might also have some sensitive closures there. |
| 53 | send_udp() should be watched as it could be abused to mess up |
| 54 | the IMP. |
| 55 | The xxx_extra_wizinfo operations are necessary for a proper |
| 56 | wizlist and should therefore be restricted to admins. |
| 57 | All other operations are potential sources for direct security |
| 58 | breaches - any use of them should be scrutinized closely. |
| 59 | |
| 60 | SEE ALSO |
| 61 | simul_efun(C), call_out_info(E), shadow(E), add_action(E), |
| 62 | wizlist(E), set_this_object(E), rename_object(E), |
| 63 | bind_lambda(E), send_udp(E), set_auto_include_string(E) |