home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / dsstlkt5.zip / dssos2tk / dss / APPLY.IDL < prev    next >
Text File  |  1998-05-08  |  6KB  |  184 lines

  1. /*------------------------------------------------------------------------
  2. ** 
  3. ** PROLOG
  4. **
  5. ** COMPONENT NAME:  ent.access
  6. **
  7. ** FILE ID:  dce/aclmanager/apply.idl
  8. **
  9. ** ORIGINS:  This code is new function for DSS.  It is IBM Original code.
  10. **
  11. ** (C) COPYRIGHT International Business Machines Corp. 1996
  12. ** All Rights Reserved
  13. ** Licensed Material - Property of IBM
  14. **
  15. ** US Government User Restricted Rights - Use, duplication or disclosure 
  16. ** restricted by GSA ADP Schedule Contract with IBM Corp.
  17. **
  18. ** END PROLOG
  19. **
  20. **------------------------------------------------------------------------
  21. **
  22. ** CHANGE HISTORY
  23. **
  24. ** MARK  DEF/FEA  YYMMMDD RELEASE  WHO  DESCRIPTION
  25. ** -----------------------------------------------------------------------
  26. **       D27529   95Dec01 ls.r40ep JMR  Initial code drop.
  27. **
  28. ** END HISTORY
  29. **
  30. **------------------------------------------------------------------------
  31. */
  32. [
  33.     uuid(572f5d00-c761-11ce-8b50-10005a7b953d),
  34.     version(1.0)
  35. ]
  36. interface apply
  37. {
  38.    import  "dce/aclbase.idl";
  39.    import  "dce/utctypes.idl";
  40.  
  41. /*------------------------------------------------------------------------
  42. **
  43. ** #define's
  44. **
  45. **------------------------------------------------------------------------
  46. */
  47.    /*
  48.    ** Tolerance values for DSS_AccessDenied errors.
  49.    */
  50.    const unsigned32 APPLY_TOLERANCE_LOW  = 0;
  51.    const unsigned32 APPLY_TOLERANCE_MED  = 1;
  52.    const unsigned32 APPLY_TOLERANCE_HIGH = 2;
  53.  
  54.    /* 
  55.    ** acl manipulate actions
  56.    */
  57.    const unsigned32 ENTRY_RENAME_USER          = 1;
  58.    const unsigned32 ENTRY_RENAME_GROUP         = 2;
  59.    const unsigned32 ENTRY_CREATE               = 3;
  60.    const unsigned32 ENTRY_DELETE               = 4;
  61.    const unsigned32 ENTRY_MODIFY_ADD           = 5;
  62.    const unsigned32 ENTRY_MODIFY_ADD_OR_CREATE = 6;
  63.    const unsigned32 ENTRY_MODIFY_DELETE        = 7;
  64.    const unsigned32 ENTRY_REPLACE              = 8;
  65.    const unsigned32 ENTRY_REPLACE_OR_CREATE    = 9;
  66.  
  67.  
  68. /*------------------------------------------------------------------------
  69. **
  70. ** typedef's
  71. **
  72. **------------------------------------------------------------------------
  73. */
  74.    typedef [switch_type(boolean)] union
  75.    {
  76.       [case (TRUE)]  sec_id_t         local;
  77.       [case (FALSE)] sec_id_foreign_t foreign;
  78.    } id_union_t;
  79.  
  80.    typedef struct id_to_replace_t
  81.    {
  82.       boolean fOldIsLocal;
  83.       [switch_is(fOldIsLocal)] id_union_t old_id;
  84.  
  85.       boolean fNewIsLocal;
  86.       [switch_is(fNewIsLocal)] id_union_t new_id;
  87.    } id_to_replace_t;
  88.  
  89.    typedef [switch_type(unsigned32)] union
  90.    {
  91.       [case (ENTRY_RENAME_USER)]  id_to_replace_t user;
  92.       [case (ENTRY_RENAME_GROUP)] id_to_replace_t group;
  93.       [default]                   sec_acl_entry_t sec_acl;
  94.    } target_t;
  95.  
  96.    typedef struct ent_entry_to_manipulate_t
  97.    {
  98.       unsigned32 action;
  99.       [switch_is(action)] target_t target;
  100.    } ent_entry_to_manipulate_t;
  101.  
  102.    typedef [ptr] ent_entry_to_manipulate_t *ent_entry_to_manipulate_p_t;
  103.  
  104.    typedef struct ent_entries_to_manipulate_t
  105.    {
  106.       unsigned32 num_entries_to_change;
  107.       [size_is(num_entries_to_change)] 
  108.                  ent_entry_to_manipulate_t entries_to_change_list[];
  109.    } ent_entries_to_manipulate_t;
  110.  
  111.    typedef struct error_entry_t
  112.    {
  113.       [string,ptr] char  *resource_name;
  114.       error_status_t  error_code;
  115.    } error_entry_t;
  116.  
  117.    typedef struct dssacl_objdata_t
  118.    {
  119.       uuid_t     owner_id;
  120.       uuid_t     group_id;
  121.       unsigned32 ref_count;
  122.       utc_t      created;
  123.       utc_t      modified;
  124.       unsigned32 modified_count;
  125.    } dssacl_objdata_t;
  126.  
  127.  
  128. /*------------------------------------------------------------------------
  129. **
  130. ** RPC's
  131. **
  132. **------------------------------------------------------------------------
  133. */
  134.    void ent_acl_replace_apply(
  135.       [ in]       handle_t        handle,
  136.       [string,in] unsigned char  *resource_name,
  137.       [ in]       sec_acl_type_t  sec_acl_type,
  138.       [ in]       sec_acl_list_t *acl_to_apply,
  139.       [ in]       unsigned32      tolerance,
  140.       [ in]       unsigned32      recursion,
  141.       [ in]       unsigned32      max_errors,
  142.       [out,size_is(max_errors)] 
  143.                   error_entry_t   error_buffer[],
  144.       [out]       unsigned32     *num_errors,
  145.       [out]       error_status_t *status);
  146.  
  147.  
  148.    void ent_acl_manipulate_apply(
  149.       [ in]       handle_t                     handle,
  150.       [string,in] unsigned char               *resource_name,
  151.       [ in]       sec_acl_type_t               sec_acl_type,
  152.       [ in]       ent_entries_to_manipulate_t *entries_to_change,
  153.       [ in]       unsigned32                   tolerance,
  154.       [ in]       unsigned32                   recursion,
  155.       [ in]       unsigned32                   max_errors,
  156.       [out,size_is(max_errors)] 
  157.                   error_entry_t                error_buffer[],
  158.       [out]       unsigned32                  *num_errors,
  159.       [out]       error_status_t              *status);
  160.  
  161.  
  162.    void net_access_apply(
  163.       [ in]       handle_t                     handle,
  164.       [string,in] unsigned char               *resource_name,
  165.       [out]       error_entry_t                error_buffer[1],
  166.       [out]       error_status_t              *status);
  167.  
  168.  
  169.    void aclimp_replace_acl(
  170.       [ in]       handle_t        handle,
  171.       [string,in] unsigned char  *pszPath,
  172.       [ in]       sec_acl_list_t *obj_acl,
  173.       [ in,ptr]   sec_acl_list_t *io_acl,
  174.       [ in,ptr]   sec_acl_list_t *ic_acl,
  175.       [out]       error_status_t *pStatus);
  176.  
  177.  
  178.    void dss_get_acl_objdata(
  179.       [in]        handle_t          handle,
  180.       [string,in] unsigned char    *pszPath,
  181.       [out]       dssacl_objdata_t *pACLData,
  182.       [out]       error_status_t   *pStatus);
  183. }
  184.