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.
Note: This file access security check is entirely independent of the Fileshare Password System and the User Supplied Logon Validation
Module.
The sequence of steps that your program and Fileshare follow are:
- Your program registers its user-ID and password with the File Handling Redirector password module. This information is used
when the Fileshare Client first logs onto the Fileshare Server.
- When your program subsequently performs an I/O operation on a file that it does not have open (such as an Open or Delete file
operation), the Fileshare Server calls the Fileshare Security at Open Validation module (FSSecOpn)
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
Syntax:
call "fssecopn" using filename
filename-length
operation-code
user-ID
return-status
Parameters:
- 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.
On Entry:
- 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
On Exit:
- 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 the cobfssecurity.dll and place it on the search path, PATH. Fileshare will notify you that it has loaded the user security modules.