set_security (security_level)
This function changes the security level for the current process to the given value. There is no restriction on the security level argument. A low-security process can alter its own security level to be higher.
If it is necessary to have a process's security level to be unalterable, then the set_security function can be re-bound after the security level is originally set (see second example). The only use of security level is in conjunction with the Cascade DataHub.
Gamma> init_ipc("spt","spq"); t Gamma> secure_point(#d,5); nil Gamma> set_security(9); 0 Gamma> secure_point(#d,5); t Gamma> secure_point(#d,12); nil Gamma> set_security(15); 9 Gamma> secure_point(#d,12); t Gamma>
The example below sets the current process's security to 5, and then re-binds set_security so that the program can no longer alter its security. The list function is used in the re-binding, as it will accept any number of arguments without error, and will have no side-effects.
Gamma> set_security(5); 0 Gamma> set_security = list; (defun list (&optional &rest s_exp...) ...) Gamma> set_security(9); (9) Gamma> secure_point(#g,10); nil Gamma> secure_point(#g,6); nil Gamma> secure_point(#g,4); t Gamma>
Copyright © 1995-2010 by Cogent Real-Time Systems, Inc. All rights reserved.