Guardian Programming Reference Summary for C

Guardian Programming Reference Summary for C—522630-001
11-1
11
SETMODE Operations
For additional information about the SETMODE procedure call, refer to the Guardian
Procedure Calls Reference Manual.
<function> Parameters and Effect
1 Disk: Set file security
param1
Bit 0 = 1 for program files only, sets accessor's ID to program file's ID
when program file is run (PROGID option).
Bit 1 = 1 sets CLEARONPURGE option on. This means all data in the
file is physically erased from the disk (set to zeros) when the file is purged. If
this option is not on, the disk space is only logically deallocated on a purge; the
data is not destroyed, and another user might be able to examine the "purged"
data when the space is reallocated to another file.
Bits 4-6 = ID allowed for reading
Bits 7-9 = ID allowed for writing
Bits 10-12 = ID allowed for execution
Bits 13-15 = ID allowed for purging
For each of the fields from bits 4-6 through bits 13-15, the value can be any
one of the following:
0 = member local ID
1 = member of owner's group (local)
2 = owner (local)
4 = any network user (local or remote)
5 = member of owner's community
6 = local or remote user having same ID as owner
7 = local super ID only
Refer to the Guardian Programmer’s Guide or the File Utility Program (FUP)
Reference Manual for an explanation of local and remote users, communities,
and related topics.
Theparam2 parameter is not used with function 1.
If this SETMODE function is used on a file that is protected by a Safeguard
disk-file authorization record, and if the user is not logged on as the super ID
(255, 255) on the system where the file is located, error 199 is returned.
This function operates only on Guardian objects. If an OSS file is specified,
file-system error 2 occurs.
2 Disk: Set file owner ID
param1
Bits 0-7 = group ID
Bits 8-15 = member ID
Theparam2 parameter is not used with function 2.
If this SETMODE function is used on a file that is protected by a Safeguard
disk-file authorization record, and if the user is not logged on as the super ID
(255, 255) on the system where the file is located, error 199 is returned.