Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- CA-Clipper Tools . Book 4-Appendices - <b>nnettrust()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 NNETTRUST()
 Grants or removes trustee rights
------------------------------------------------------------------------------
 Syntax

     NNETTRUST(<cName>,[<nType>],<cPath>,[<cRights>|
        <nRights>]    --> lSuccess

     Netware: 2.2 and 3.11

 Arguments

     <cName>  Designates the name of the bindery object for which the
     trustee rights are granted or removed.  In most cases, <cName>
     represents the login name of a user.

     <nType>  Designates the object type of <cName>.  The default value
     designates the object type, user.

     <cPath>  Designates a path designation that specifies a directory or
     a file for which the trustee rights are granted.  The path can be passed
     in the Novell notation or in the DOS notation if the directory or file
     has been mapped to a drive.

     <cRights>  Designates a character string that contains the symbols
     for the rights that are granted to <cName> on <cPath>.

     <nRights>  Designates a numeric value that contains a bit mask for
     the rights that are granted to <cName> on <cPath>.

 Returns

     NNETTRUST() returns .T. if the rights have been granted or removed
     successfully.

 Description

     NOVELL NET TRUSTEE
     Under Netware, the access rights for each user can be assigned on the
     directory level.  Under Netware 3.x, the access rights for each user can
     be assigned on the file level.  These rights are called trustee rights.
     NNETTRUST() allows you to grant or remove trustee rights within a
     CA-Clipper application  However, supervisor rights are required.

     <cPath> specifies the directory or the file for which the trustee rights
     are granted or removed.  To set trustee rights, a value must be passed
     for <cRights> or <nRights>.  <cRights> must contain a character string
     in which each character represents an attribute.  <nRights> must be
     passed as numeric value resulting from a bitwise OR operation of the
     binary significance of the attributes.

     The possible rights under Netware 2.x and Netware 3.x are shown in the
     following tables:

     Table 23.19:  Rights Coding under Netware 2.x
     ------------------------------------------------------------------------
     Bit     Definition     Description
     ------------------------------------------------------------------------
     1       READ           Read files
     2       WRITE          Write files
     3       OPEN           Open files
     4       CREATE         Create new files
     5       DELETE         Delete files
     6       PARENTAL       Create new directories
     7       SEARCH         Search files in directories
     8       MODIFY         Modify files or attributes
     ------------------------------------------------------------------------

     Table 23.20:  Rights Coding under Netware 3.x
     ------------------------------------------------------------------------
     Bit     Definition     Description
     ------------------------------------------------------------------------
     1       READ           Read files
     2       WRITE          Write to files
     3       RESERVED
     4       CREATE         Create new files
     5       ERASE          Delete files
     6       ACCESS CONTROL Trustee rights can be modified
     7       FILE SCAN      Search files in directories
     8       MODIFY         Modify files or attributes
     9       SUPERVISORY    All rights / can grant rights
     ------------------------------------------------------------------------

     The first letter of the definition represents the symbol for <cRights>.

     To remove trustee rights, do not pass a value for the parameters
     <cRights>|<nRights>.

 Note

     .  For detailed information about rights and security, see the
        Novell documentation.

 Examples

     .  Grant read and write access and the rights to create, delete,
        search, and modify files and directories for user MIKE on directory
        VOL1:DATEN/APRIL on the default server.  The following example
        differentiates between Netware 2.x and 3.x:

        IF NNETVER()<'3'
        lOk=NNETTRUST('MIKE',,'VOL1:DATEN/APRIL','RWOCDPSM')
        ELSE
        lOk=NNETTRUST('MIKE',,'VOL1:DATEN/APRIL','RWCEFM')
        ENDIF
        IF lOk
         ? 'Trustee rights set successfully'
        ELSE
         ? 'Rights could not be set, supervisor rights required!'
        ENDIF

     .  Remove the trustee rights for user MIKE in directory
        VOL1:DATEN/APRIL:

        IF NNETTRUST('MIKE',,'VOL1:DATEN/APRIL')
         ? 'Trustee rights removed successfully'
        ELSE
         ? 'Rights could not be removed, supervisor rights required!'
        ENDIF

See Also: NNETTRSLST()

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