Security functions

The security functions return information about security services and user-defined roles. Table 11-14 lists the name of each security function, the argument it takes, and the result it returns.

Table 11-14: Security functions

Function

Argument

Result

is_sec_service_on

(security_service_nm)

Determines whether a particular security service is enabled. Returns 1 if the service is enabled. Otherwise, returns 0.

mut_excl_roles

(“role_1” , “role_2” [, "membership" |"activation"])

Returns information about the level of mutual exclusivity between two roles.

proc_role

(“role_name” )

Returns 0 if the invoking user does not possess or has not activated the specified role; 1 if the invoking user has activated the specified role; and 2 if the user possesses the specified role directly or indirectly, but has not activated the role.

role_contain

(["role1 ", "role2 "])

Returns 1 if the first role specified is contained by the second.

role_id

(“role_name”)

Returns the role ID of the specified role name.

role_name

(role_id )

Returns the role name of the specified role ID.

show_role

( )

Returns the login’s current active roles, if any (sa_role, sso_role, oper_role, replication_role, or role_name). If the login has no roles, returns NULL.

show_sec_services

( )

Returns a list of the available security services that are enabled for the current session

For more information about security features and user-defined roles, see the System Administration Guide.