Go to the first, previous, next, last section, table of contents.


rootOmnipotentlyDo

Control-struct: rootOmnipotentlyDo{ ... }
file: job.t
package: muf
status: alpha

An error will be signaled if @$s.actingUser is not of Class Root. (In the usual Muq configuration, the only instance of Class Root is .u["root"].)

This construct allows you to write a function which executes with essentially no security restrictions at all. Obviously, this is very dangerous and should be done very carefully indeed and only when truly needed: The surface syntax is intentionally clumsy to discourage frivolous use. When practical, use the somewhat less dangerous rootAsUserDo: See section rootAsUserDo.

This construct saves the current value of jS.j.privs, an internal C-level privilege word, on the loop stack, then sets the omnipotent bit in jS.j.privs. Upon exit from the construct, the original value of jS.j.privs is restored.

See section rootPushPrivsOmnipotentFrame. See section pushLockframe. See section asMeDo.


Go to the first, previous, next, last section, table of contents.