set_security

Gamma: Version 4.0
Prev |  | Next

# `set_security`

`set_security` -- changes the security level for the current process.

## Syntax

    set_security (security_level)

## Arguments

`security_level`

  The new security level for this process.

## Returns

The previous security level for this process.

## Description

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.

## Example

        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>

## See Also

`point_security`, `secure_point`

Prev | Home | Next
`set_domain` | Up | `unregister_point`

Copyright 1995-2002 by Cogent Real-Time Systems, Inc.