Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Novlib 3.30 Online Reference - <b> dirirmaskget() / dirirmaskset()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 DirIRMaskGet() / DirIRMaskSet()
------------------------------------------------------------------------------
 Purpose:
 Get or set a directory's inherited rights mask.

 Syntax:
 iMask = DirIRMaskGet( lpszPath )
 iMask = DirIRMaskSet( lpszPath, iMask )

 Parameters:
 lpszPath The full NetWare path of the directory.
 iMask    The new IR mask.

 Returns:
 A numeric value (signed short int).

 The CA-Clipper names for these functions are:
 DirIRMskGet() / DirIRMskSet()

 Description:
 DirIRMaskGet() returns the inherited rights (IR) mask of the directory
 specified by lpszPath. lpszPath must be the full directory path
 including the volume name, e.g. SYS:DATA\WP.

 DirIRMaskSet() sets the inherited rights mask for the specified directory
 lpszPath to the value iNewMask and returns the previous mask.
 The mask can be calculated from the following table:

 Value NetWare 286 NetWare 386 & NetWare 4.0

 1     Read        Read
 2     Write       Write
 4     Open        Reserved
 8     Create      Create
 16    Delete      Erase
 32    Parental    Access Control
 64    Search      File Scan
 128   Modify      Modify
 256   N/A         Supervisor

 The return values are almost identical, except that under NetWare 3 and 4,
 there is no Open return value. This is because File Scan is now an
 amalgamation of the old Search and Open attributes. There is also a new
 attribute called Supervisory. For example the return value 507 is 1 + 2 + 8
 + 16 +32 + 64 + 128 + 256 = 507 and is a valid return value for NetWare
 386.

 Returns NOVERRINT if an error occurs.

 Example:
 // To return the inherited rights mask of SYS:DATA\WP:
 iRightsMask = DirIRMaskGet( "SYS:DATA\WP" )
 if ( iRightsMask != NOVERRINT )
    ? "Directory SYS:DATA\WP has inherited rights of ", iRightsMask
 endif
 // To change the inherited rights mask of directory SYS:DATA\WP to Read
 // and File Scan ( NetWare 386 ):
 iOldRightsMask = DirIRMaskSet( "SYS:DATA\WP", 65 )
 iRightsMask = DirIRMaskGet( "SYS:DATA\WP" )
 if ( iRightsMask != NOVERRINT )
    ? "Directory SYS:DATA\WP's inherited rights is now ", iRightsMask
 endif

 Notes:
 To change the IR mask requires the appropriate NetWare security
 equivalence.

See Also: DirEffectiveRightsGet()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson