NWScanForTrustees(3nw)


NWScanForTrustees -- scans directory entry for trustees in DOS name space

Synopsis

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

NWCCODE N_API NWScanForTrustees (NWCONN_HANDLE conn, NWDIR_HANDLE dirHandle, pnstr8 path, pnuint32 iterHandle, pnuint16 numOfEntries, NWET_INFO NWFAR* entryTrusteeInfo);

Description

The parameters are as follows:

conn
(IN) Specifies the NetWare server connection handle.

dirHandle
(IN) Specifies the NetWare directory handle pointing to the directory to scan.

path
(IN) Points to an absolute directory (if no dirHandle is specified) path (or one relative to the directory handle). If an absolute path is specified, it must not be more than 255 bytes long.

iterHandle
(IN/OUT) Points to the server maintained sequence number. Initially must be set to 0.

numOfEntries
(OUT) Points to the buffer to receive the number of entries returned by NWScanForTrustees.

entryTrusteeInfo
(OUT) Points to NWNET_INFO.

Return values

0x0000
SUCCESSFUL

0x8801
INVALID_CONNECTION

0x8998
VOLUME_DOES_NOT_EXIST

0x899B
BAD_DIRECTORY_HANDLE

0x899C
INVALID_PATH

0x899C
NO_MORE_TRUSTEES

Notices

For 3.x-4.x servers, NWScanForTrustees works for both files and directories. For 2.x servers, NWScanForTrustees works only for directories.

Due to subtle differences in the operation of 2.x and 3.x servers, trustees may remain after an iteration, even though not all 20 positions are filled. If a postion is not filled, objectID is set to 0L. Check objectID before printing each objectRights.

dirHandle can be zero if path points to the complete path, including the volume name. path can point to wildcard characters. However, only the first matching directory is scanned (behavior typical of 2.x servers).

Directories can have any number of bindery objects as trustees. Trustees are returned in groups of 20 TRUSTEE_INFO structures. To obtain a complete list, set sequence to 0L for the initial call. NWScanForTrustees should then be called (for example in a while or do loop) until it returns 0x899C (NO_MORE_TRUSTEES). Because 0x899C also indicates INVALID_PATH, ensure the dirHandle/path combination is correct.


NOTE: You could call NWAllocTemporaryDirectoryHandle with the path to check for a valid path.

NWET_INFO receives trustee information; however, only TRUSTEE_INFO is valid for servers 3.x and later. The first three fields, entryName, creationDate, and ownerID are valid only for 2.x servers.

NWET_INFO receives trustee information; however, only TRUSTEE_INFO is valid for servers 3.x and later. The first three fields, entryName, creationDateAndTime, and ownerID are valid only for 2.x servers. sequenceNumber should always be ignored.

NWScanForTrustees should be called until it returns 0x899C (NO_MORE_TRUSTEES). Because 0x899C also means INVALID_PATH, ensure the dirHandle/path combination is correct.

NULL can be substituted for items listed as optional.

Services

File Systems

NCP calls

0x2222 22 12 Scan Directory For Trustees
0x2222 22 38 Scan File Or Directory For Extended Trustees
0x2222 23 17 Get File Server Information
0x2222 87 05 Scan File Or Subdirectory For Trustees

 
 0x2222   22   12   Scan Directory 
                    For Trustees 
 0x2222   22   38   Scan File Or 
                    Directory For 
                    Extended 
                    Trustees 
 0x2222   23   17   Get File Server 
                    Information 
 0x2222   87   05   Scan File Or 
                    Subdirectory 
                    For Trustees 

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