NWGetEffectiveRights

Returns effective rights for the specified directory

Local Servers:blocking
Remote Servers:blocking
NetWare Server:3.11, 3.12, 3.2, 4.x, 5.x, 6.x
Platform:NLM, Windows NT, Windows 95, Windows 98
Library:Cross-Platform NetWare Calls (CAL*.*)
Service:File System

Syntax

   #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);
   

Delphi Syntax

   uses calwin32 
    
   Function NWGetEffectiveRights 
     (conn : NWCONN_HANDLE; 
      dirHandle : NWDIR_HANDLE; 
      const path : pnstr8; 
      effectiveRights : pnuint16 
   ) : NWCCODE;
   

Parameters

conn

(IN) Specifies the NetWare server connection handle.

dirHandle

(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).

path

(IN) Points to the absolute path (or a path relative to the dirHandle parameter) of the directory whose effective rights mask is being returned.

effectiveRights

(OUT) Points to the effective rights mask for the directory.

Return Values

These are common return values; see Return Values (Return Values for C) for more information.

0x0000

SUCCESSFUL

0x8801

INVALID_CONNECTION

0x890A

NLM_INVALID_CONNECTION

0x8996

SERVER_OUT_OF_MEMORY

0x8998

VOLUME_DOES_NOT_EXIST

0x899B

BAD_DIRECTORY_HANDLE

0x899C

INVALID_PATH

0x89A1

DIRECTORY_IO_ERROR

0x89FD

BAD_STATION_NUMBER

0x89FF

Failure

Remarks

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:

C Value

Delphi Value

Value Description

0x0001

$0001

TR_READ

0x0002

$0002

TR_WRITE

0x0008

$0008

TR_CREATE

0x0010

$0010

TR_DELETE

0x0010

$0020

TR_OWNERSHIP

0x0040

$0040

TR_FILE_SCAN

0x0080

$0080

TR_MODIFY

NWGetEffectiveRights works on files as well as directories.

See effright.c for sample code.

NCP Calls