F.PERM - permissions and passwords on a file.
Usage:
stat = f.perm(catstack, perms [, function]);
Where:
- catstack
- is a file system cat/file stack with the pathname of the
catalog or file whose permissions are to be checked.
- perms
- is a word containing in the lower half bits corresponding
to the permissions to be checked for. Normally it is
constructed by ORing the standard permission bit
manifests (.HREDB, .HWRTB etc.). If more than one
permission bit is specified, F.PERM checks to see if the
user has any of the permissions.
- function
- This is one of the two FMS function codes .HCMOD or
.HFMOD. .HCMOD is used if it is known that the pathname
identifies a catalog, and .HFMOD if it is a file. If
"function" is omitted, F.PERM will first do a
"get current" to determine if it is a catalog
or file. Since "get current" is normally a
privileged function, this will only work if the program
is privileged. It has been determined experimentally that
.HFMOD always works even if the pathname identifies a
catalog, so for now just supply .HFMOD as the argument.
- stat
- indicates the status of the permissions check. If it is
negative, it gives the negative of the FMS major status.
A non-negative value indicates that the user has at least
one of the requested permissions, and that the passwords
are correctly supplied. In this case, the lower half of
"stat" contains the permissions accumulated so
far.
Description:
F.PERM does a null modify with the permission check option, to
check passwords and to see if a user has any one of a requested
set of permissions. If "function" is provided, F.PERM
does not require privilege to run.
TSS programs with MAIL privilege or batch programs with
PRIVITY may use .ALIAS to set the userid for whom permissions are
being checked.
Copyright © 1996, Thinkage Ltd.