Alters the Trusted Computing Base (TCB) status of a file.
Security Library (libc.a)
#include <sys/tcb.h>
int tcb ( Path, Flag)
char *Path;
int Flag;
The tcb subroutine provides a mechanism to query or set the TCB attributes of a file.
This subroutine is not safe for use with multiple threads. To call this subroutine from a threaded application, enclose the call with the _libs_rmutex lock. See "Making a Subroutine Safe for Multiple Threads" in AIX 5L Version 5.2 General Programming Concepts: Writing and Debugging Programs for more information about this lock.
Path | Specifies the path name of the file whose TCB status is to be changed. |
Flag | Specifies the function to be performed. Valid values are defined in the sys/tcb.h file and include the following: |
Upon successful completion, the tcb subroutine returns a value of 0 if the Flags parameter is either TCB_ON or TCB_OFF. If the Flags parameter is TCB_QUERY, the current status is returned. If the tcb subroutine fails, a value of -1 is returned and the errno global variable is set to indicate the error.
The tcb subroutine fails if one of the following is true:
Access Control: The calling process must have search permission for the object named by the Path parameter. Only the root user can set the tcb attributes of a file.
The chmod or fchmod subroutine, statx, stat, lstat, fstatx, fstat, fullstat, or ffullstat (statx, stat, lstat, fstatx, fstat, fullstat, ffullstat, stat64, lstat64, or fstat64 Subroutine) subroutine.
The chmod command.
List of Security and Auditing Subroutines, Subroutines Overview in AIX 5L Version 5.2 General Programming Concepts: Writing and Debugging Programs.