Open System Services Programmer's Guide
&bytesread, /* number of bytes read */
&request_tag /* request tag */
);
/* If the condition code returned is not the one for success,
print a message and exit. */
if(_status_ne(CC)) { /* check the success condition code */
fprintf(stderr, "Awaitiox failed.\n");
exit(1);
}
printf("Bytes read = %d\n", bytesread);
/* Print out the first ten bytes in octal plus "string". */
printf("First 10 bytes read (in octal): ");
for (i = 0; i < 10; i++)
printf("%o ", bufgdn[i]);
printf("\n");
bufgdn[bytesread] = '\0'; /* make sure string is NULL-terminated */
printf("\n%s\n", bufgdn);
return(0);
}
OSS File-Access Permissions
You obtain file-access permissions and other OSS file information with the stat(), lstat(),
and fstat() functions. Mappings of Guardian security to OSS file-access permissions are
summarized in Table 6 (page 62). Refer to the stat(2) reference page either online or in the
Open System Services System Calls Reference Manual for details about OSS file access permissions
and how they and Guardian security attributes and settings are mapped to each other.
Table 6 Mappings of Guardian Security to OSS File-Access Permissions
OSS File-Access PermissionGuardian Security Attributes and Settings
OtherNetwork (N)
OtherAny User (A)
GroupCommunity or Group (C or G)
OwnerUser (U or O)
None (-)Super ID (-)
ReadRead
WriteWrite
ExecuteExecute
(Ignored)Purge
62 Managing Files