To use the programming interfaces described in this chapter, you need the following header file.
#include <tsix/t6attrs.h> |
The examples in this chapter compile with the following libraries:
-lsocket -lt6 -ltsol |
The t6attr_t data structure can hold the full set security attributes.
The t6attr_id_t structure contains enumerated constants that represent the full set of security attribute values. Variables of type t6attr_t are initialized with these constants. Most of the constants have a fixed size in bytes as shown below; however, T6_GROUPS, has a variable size that reflects the actual size of its value.
The t6set_attr(3NSL) routine takes a parameter of any type that must be cast to the appropriate type shown below.
The t6get_attr(3NSL) routine returns a variable of any type that must be cast to the appropriate type shown below.
Enumerated Constant |
Description |
Data Type |
Size in Bytes |
---|---|---|---|
T6_SL |
Sensitivity label |
bslabel_t |
36 |
T6_SESSION_ID |
Network session ID |
sid_t |
4 |
T6_CLEARANCE |
Clearance |
bclear_t |
36 |
T6_PRIVILEGES |
Effective privileges |
priv_set_t |
16 |
T6_AUDIT_ID |
Audit ID |
au_id_t |
4 |
T6_PID |
Process ID |
pid_t |
4 |
T6_AUDIT_INFO |
Additional audit info |
auditinfo_t |
24 |
T6_UID |
Effective User ID |
uid_t |
4 |
T6_GID |
Effective Group ID |
gid_t |
4 |
T6_GROUPS |
Supplementary Group IDs |
gid_t |
Variable |
T6_PROC_ATTR |
Process Attribute Flags |
pattr_t |
4 |
The t6mask_t data structure represents the set of security attributes of current interest. A variable of type t6mask_t is initialized by assigning the following enumerated values.
T6M_SL |
Sensitivity label |
T6M_SESSION_ID |
Network session ID |
T6M_CLEARANCE |
Clearance |
T6M_PRIVILEGES |
Effective privilege set |
T6M_AUDIT_ID |
Audit ID |
T6M_PID |
Process ID |
T6M_AUDIT_INFO |
Terminal ID and preselection masks |
T6M_UID |
Effective User ID |
T6M_GID |
Effective Group ID |
T6M_GROUPS |
Supplementary Group IDs |
T6M_NO_ATTRS |
No attributes |
T6M_ALL_ATTRS |
All attributes |