Veritas™ File System Programmer's Reference Guide - Solaris
- Veritas File System software developer's kit
- File Change Log
- About the File Change Log file
- Record types
- File Change Log tunables
- Application programming interface for File Change Log
- API functions
- File Change Log record
- Copying File Change Log records
- Veritas File System and File Change Log upgrade and downgrade
- Reverse path name lookup
- Multi-volume support
- Named data streams
- Veritas File System I/O
- Caching advisories
- Extents
- Thin Reclamation
fcl_acsinfo structure
When tracking access-info is enabled, VxFS logs the access information such as:
The real and effective user and group ID of the accessing application
The node from where the file was accessed
The process id of the user application along with each record
When the application reads the FCL, the information is returned in the fr_acsinfo field.
The fr_acsinfo points to an FCL_acsinfo structure, defined as follows:
struct fcl_acsinfo { uint32_tfa_ruid; uint32_tfa_rgid; uint32_tfa_euid; uint32_tfa_egid; uint32_tfa_pid; uint32_tfa_nodeid; };
Note:
The accessinfo is not returned as a separate record type but as additional information along with the other records. In addition, the accessinfo information is not always present with every record (for example, when tracking accessinfo is not enabled). However, even when accessinfo is enabled in some file system internal operations (for example, truncating a file when it is removed), the access information may not be present. To help determine if access information is available, the FCL record contains a flag called fcl_acsinfovalid which is non-zero only if the accessinfo is present with a particular record.
Several of the fields in the fcl_acsinfo structure are pointers and need memory to store the actual contents. This is handled by storing the actual data immediately after the FCL record, and updating the pointer to point to the data. The record length fr_reclen field is updated to account for the whole data. Thus, each FCL record returned by vxfs_fcl_read is a variable size record, whose length is indicated by fr_reclen_field.
Figure: Sample link record illustrates how the data is laid out in a sample link record.
The following code sample traverses the set of records returned by a call to vxfs_fcl_read and prints the user ID:
Struct fcl_record*fr; Char *tbuf; ... error = vxfs_fcl_read(fh, buf, &bufsz, FCL_ALL_V4_EVENTS, &nentries); tbuf = buf; while (--nentries) { fr = (struct fcl_record *)tbuf; if (fr->fr_acsinfovalid) { printf("Uid %ld\n", fr->fr_acsinfo->uid; } tbuf += fr->fr_reclen; }
Note:
FCL_ALL_V4_EVENTS are event masks.
More Information