NWGetEffectiveRights(3nw)


NWGetEffectiveRights -- returns caller's effective rights in specified directory

Synopsis

   #include <nwdentry.h> 
   or 
   #include <nwcalls.h> 
   

NWCCODE N_API NWGetEffectiveRights (NWCONN_HANDLE conn, NWDIR_HANDLE dirHandle, pnstr8 path, pnuint16 effectiveRights);

Description

The parameters are as follows:

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.

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

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

Return values

0x0000
SUCCESSFUL

0x8801
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

Notices

NWGetEffectiveRights replaces NWGetEffectiveDirectoryRights from previous versions of NWCalls.

dirHandle can be zero if path points to the complete path, including the volume name.

The maximum rights mask bits are defined in the table below:

C Value Value Description
0x0001 TR_READ
0x0002 TR_WRITE
0x0008 TR_CREATE
0x0010 TR_DELETE
0x0010 TR_OWNERSHIP
0x0040 TR_FILE_SCAN
0x0080 TR_MODIFY

 
 ----------------------------------------------- 
| C Value|  Value Description                  | 
|--------|-------------------------------------| 
| 0x0001 |  TR_READ                            | 
|--------|-------------------------------------| 
| 0x0002 |  TR_WRITE                           | 
|--------|-------------------------------------| 
| 0x0008 |  TR_CREATE                          | 
|--------|-------------------------------------| 
| 0x0010 |  TR_DELETE                          | 
|--------|-------------------------------------| 
| 0x0010 |  TR_OWNERSHIP                       | 
|--------|-------------------------------------| 
| 0x0040 |  TR_FILE_SCAN                       | 
|--------|-------------------------------------| 
| 0x0080 |  TR_MODIFY                          | 
|--------|-------------------------------------| 
To determine the requesting workstation's effective rights, NWGetEffectiveRights performs a logical AND between the maximum rights mask of the directory and the workstation's current trustee rights.

The workstation's current trustee rights are obtained by performing a logical OR between a workstation's trustee access mask and the trustee access mask of any object to which the process is security equivalent.

The workstation's 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.

effectiveRights returned to the client indicates which of the eight possible directory rights the client has in the targeted directory. effectiveRights of zero indicates the client has no rights in the target directory.

For 3.x-4.x servers, NWGetEffectiveRights works on files as well as directories. For 2.x servers, NWGetEffectiveRights works only on paths.

Services

File Systems

NCP calls

0x2222 22 3
Get Effective Directory Rights

0x2222 22 42
Get Effective Rights

0x2222 23 17
Get File Server Information

0x2222 87 29
Get Effective Directory Rights

30 January 1998
© 1998 The Santa Cruz Operation, Inc. All rights reserved.