Returns effective rights for the specified directory
#include <nwdentry.h>
or
#include <nwcalls.h>
N_EXTERN_LIBRARY(NWCCODE) NWGetEffectiveRights (
NWCONN_HANDLE conn,
NWDIR_HANDLE dirHandle,
const nstr8 N_FAR *path,
pnuint16 effectiveRights);
uses calwin32
Function NWGetEffectiveRights
(conn : NWCONN_HANDLE;
dirHandle : NWDIR_HANDLE;
const path : pnstr8;
effectiveRights : pnuint16
) : NWCCODE;
(IN) Specifies the NetWare server connection handle.
(IN) Specifies the NetWare directory handle associated with the directory path for which the effective rights are desired (0 if the path parameter points to the complete path, including the volume name).
(IN) Points to the absolute path (or a path relative to the dirHandle parameter) of the directory whose effective rights mask is being returned.
(OUT) Points to the effective rights mask for the directory.
These are common return values; see Return Values (Return Values for C) for more information.
To determine the effective rights of the requesting workstation, NWGetEffectiveRights performs a logical AND between the maximum rights mask of the directory and the current trustee rights of the workstation.
The current trustee rights are obtained by performing a logical OR between a trustee access mask and the trustee access mask of any object to which the process is security equivalent.
The current trustee rights can be explicitly listed in the directory or inherited from the parent directory. The maximum rights masks of parent directories do not affect inherited trustee rights.
The effectiveRights parameter returned to the client indicates which of the eight possible directory rights the client has in the targeted directory. An effectiveRights parameter of zero indicates the client has no rights in the target directory.
The maximum rights mask bits are defined in the table below:
NWGetEffectiveRights works on files as well as directories.
See effright.c for sample code.