NAME | SYNOPSIS | DESCRIPTION | RETURN VALUES | ATTRIBUTES | NOTES | SEE ALSO
#include <tsol/auth.h>char *auth_to_str(auth_t auth_id);
auth_to_str()
returns a pointer to the statically allocated, null-terminated text authorization name specified by
auth_id
. If
auth_id
is an undefined authorization
ID
, the integer ordinal of
auth_id
is returned. If
auth_id
is greater than the maximum allowable authorization
ID
,
TSOL_MAX_AUTH
, a
NULL
is returned.
auth_set_to_str() places the name of each authorization in authset into a string which is allocated and returned by the function. The memory for this string may be released with free(3C) . Authorization names are separated by the character separator . Integer ordinals are used to name the undefined authorizations found in the authorization list. The string none is returned when representing an empty authorization list.
str_to_auth()
returns the numeric authorization
ID
specified by the null-terminated text authorization name
auth_name
.
auth_name
is the name in the
Names
field of
auth_name(4)
; this function does not parse the names in the
Manifest Constant
field of
auth_name(4)
. Authorization names can be specified in upper or lower case. An integer ordinal in the string is also acceptable. This function returns
0
when the string cannot be translated, or when an integer ordinal
in the string is greater than
TSOL_MAX_AUTH
.
str_to_auth_set() breaks the auth_names string into tokens to be translated into an authorization list based on the token separators separators . auth_names are names in the Names field of auth_name(4) ; this function does not parse the names in the Manifest Constant field of auth_name(4) . The string none is translated to an empty authorization list (NULL) . This function returns a pointer to an auth_set_t on success or a NULL if either the auth_names parameter is NULL or the function cannot allocate enough memory. If some invalid authorization names appear in the auth_names string, the function converts these invalid authorizations into auth_id s with the value of 0 .
get_auth_text() returns a pointer to the statically-allocated, null-terminated authorization description text specified by auth_id .
chkauth() returns 1 if the user, specified by username has the authorization specified by auth_id .
free_auth_set() releases the memory returned by str_to_auth_set() .
auth_to_str() returns a pointer to the translated authorization name string. It returns NULL on failure.
str_to_auth() returns the numeric authorization id. It returns 0 on failure.
auth_set_to_str() returns a pointer to the translated authorization names string. It returns NULL on failure.
str_to_auth_set() returns NULL on success.
get_auth_text() return a string on success and NULL upon failure.
chkauth() returns 1 on success and 0 on failure.
See attributes(5) for descriptions of the following attributes:
ATTRIBUTE TYPE | ATTRIBUTE VALUE |
---|---|
Availability | SUNWtsu |
MT-Level | MT-Safe |
This interface is uncommitted, which means it may change between minor releases of the Trusted Solaris environment. To use these routines, the program must be loaded with the Trusted Solaris library libtsoldb .
NAME | SYNOPSIS | DESCRIPTION | RETURN VALUES | ATTRIBUTES | NOTES | SEE ALSO