ACCESS_CHECK (V00507)
user-written system services. There is also a top-level program in C which
exercises ONE of those system services.
The purpose of 4 of the system services is to determine access to (and
existence of) a specified disk file. This is similar to the VAX C RTL
function chk_access, but works in the presence of ACL's. It is also possible
to check access on behalf of another user. The kind of access is specified
either as a unix/VAX C 'mode' or as a VMS access mask. (The main difference is
that VMS makes a difference between WRITE and DELETE access.) The 5th system
service retrieves the active rightslist (as opposed to the authorized rights)
of the current process.
The top-level C program calls the access check system service on behalf of
another user, with the access type specified as a unix mode. The result is
passed to DCL $STATUS.
The system services shareable image is written on DEC's example file
SYS$EXAMPLES:USSDISP.MAR. Included in this DECUS distribution is only
the part contributed by Erik Basilier at Motorola, Inc., not DEC's code.
To make use of this distribution, the user must merge the provided code
with DEC's code as follows:
* First make sure you have the right DEC file: SYS$EXAMPLES:USSDISP.MAR
dated 26-OCT-1989 15:57:03.64.
* Merge the files as follows:
$ EDIT/SUM USSDISP.MAR/OUTPUT=USR_SERV.MAR/UPD=USR_SERV_401_MOT.MAR
* The user now has a new source file USR_SERV.MAR which must be assembled,
linked and installed:
$ link/notrace/protect/nosysshr/share=sys$share:usr_serv-
/nomap -
sys$input/options
sys$system:sys.stb/selective
sys$system:sysdef.stb/selective
cluster=transfer_vector,,,usr_serv.obj
gsmatch=lequal,1,1
universal=chk_access
universal=usr_access
universal=chkv_access
universal=usrv_access
universal=get_proc_rights
$ install
add/protect/share/nowrite sys$share:usr_serv.exe
Further information is given in DEC's example file.
The top level C program is USER_ACCESS.C. The object must be linked with
the shareable image and the resulting executable must be installed with
READALL (or executed with that privilege).
Click on FTP to download from the FTP archives.
![[FTP]](http://www2.encompassus.org/hidedecus/graphics/i_ftp.gif)