t6get_attr/t6set_attr(3N) t6get_attr/t6set_attr(3N)
t6get_attr, t6set_attr - Get or set security attributes
cc [ flags ... ] file
#include <sys/t6attrs.h>
void *t6get_attr(t6attr_id_t attr_type, const t6attr_t t6ctl)
int t6set_attr(t6attr_id_t attr_type, const void *attr_buf, t6attr_t
t6ctl)
t6get_attr() takes a control structure, t6ctl, and attribute type,
attr_type, and returns a pointer to the requested attribute value (type)
from the opaque control structure t6ctl. attr_type contains a number
defined in <sys/t6attrs.h> that specifies what type of attribute that the
caller is interested in getting. Only one type can be specified per
call.
Returned value by t6get_attr() should be type cast to the standard type
that represents the type indicated by attr_type.
t6set_attr() replaces the requested attribute value (type) in t6ctl with
the value pointed to by attr_buf. Type of the attribute is specified in
attr_type as one of the numbers defined in <sys/t6attrs.h>, and also
listed in the following table:
NAME of attribute TYPE
T6_SL msen_t
T6_NAT_CAVEATS char * (size = T6_MAX_TEXT_BUF)
T6_INTEG_LABEL mint_t
T6_SESSION_ID uid_t *
T6_CLEARANCE msen_t
T6_ACL acl_t
T6_IL not implemented
T6_PRIVILEGES cap_t
T6_AUDIT_ID uid_t *
T6_PID pid_t *
Page 1
t6get_attr/t6set_attr(3N) t6get_attr/t6set_attr(3N)
T6_RESV10 unused, reserved for future use
T6_AUDIT_INFO char * (size = T6_MAX_TEXT_BUF)
T6_UID uid_t *
T6_GID gid_t *
T6_GROUPS t6groups_t *
T6_PROC_ATTR not implemented
On successful completion, t6get_attr() returns a pointer to the
appropriate value if it exists in the attribute structure, otherwise it
returns NULL. t6set_attr() returns 0 if the attribute structure can
contain the requested attribute, otherwise it returns -1 and does not
change the attribute structure.
An attempt to set a reserved or not implemented attribute will result in
error where -1 is returned, and the error value stored in the global and
per-thread error locations (See setoserror(3C)).
[EINVAL] Invalid argument.
libt6(3N), t6attr_alloc(3N), t6create_attr(3N), t6free_attr(3N).
Trusted Systems Interoperability Group
PPPPaaaaggggeeee 2222 [ Back ]
|