Whenever a Fileshare Server receives an open request on a file from a Fileshare Client, the Fileshare Server calls the Fileshare Security at Open validation module (FSSecOpn).
The Fileshare Security at Open Validation module supplied with Fileshare allows any Fileshare Client to access a data file. If you need to restrict access to specific files, you must provide your own, alternative, Fileshare Security at Open Validation module for the Fileshare Server to call.
If the Fileshare Security at Open Validation module allows the file access, the operation is allowed to complete. If the module does not allow the file access, a file status of 9/037 "access denied" is returned to the Fileshare Client and the operation is not allowed to complete.
The sequence of steps that your program and Fileshare follow are:
You can replace the supplied Fileshare Security at Open Validation module with one of your own in order to use your own criteria for validating the open request. Your new module must comply with the Fileshare Security at Open Validation module's interface described below
call "fssecopn" using filename filename-length operation-code user-ID return-status
filename | pic x(n). |
filename-length | pic x(2) comp-x. |
operation-code | pic x(2) comp-x. |
user-ID | pic x(20). |
return-status | pic x comp-x. |
filename | The name of the data file that the Fileshare Client wants to open |
filename-length | The length of filename |
operation-code | The operation code specifying the I/O operation. These codes are those used by the Callable File Handler. See your online help for details on the Callable File Handler. |
user-ID | The user-ID of the Fileshare Client making the open request |
return-status | Set to 0 if the open request is allowed. Any other status indicates that the Fileshare Client is not allowed to open the data file and an error status is returned. |
Comments:
You can create your own fssecopn module, link it into a cobfssecurity shared object and place it on the search path, LD_LIBRARY_PATH (or LIBPATH on AIX platforms). Fileshare will notify you that it has loaded the user security modules.