home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / os / vms / 20257 < prev    next >
Encoding:
Internet Message Format  |  1993-01-03  |  2.0 KB

  1. Xref: sparky comp.os.vms:20257 comp.lang.ada:3857
  2. Newsgroups: comp.os.vms,comp.lang.ada
  3. Path: sparky!uunet!cs.utexas.edu!asuvax!ncar!uchinews!iitmax!news
  4. From: LEDUC@MINNA.IIT.EDU (USERS)
  5. Subject: VAX/VMS ACLs
  6. Message-ID: <1993Jan4.042315.31541@iitmax.iit.edu>
  7. Sender: news@iitmax.iit.edu (News)
  8. Organization: ILLINOIS INSTITUTE OF TECHNOLOGY, CHICAGO
  9. Date: Mon, 4 Jan 93 04:23:15 GMT
  10. X-News-Reader: VMS NEWS 1.24
  11. Lines: 48
  12.  
  13. Hi Everyone,
  14.  
  15. I'm kinda of new to VAX/VMS ADA. I was wondering whether someone out
  16. there can help. I have the following program I am tring to set the
  17. ACL on a file using system services. I have already tried spawning
  18. a subprocess to set the ACL, But spawning cost a great deal of CPU time.
  19. I was hoping using system servies would be faster, but I am unable
  20. to get it to work.
  21.  
  22. with Condition_Handling;
  23. with Lib;
  24. with starlet;
  25. with system;
  26.  
  27. procedure test is
  28.    status : Condition_handling.Cond_Value_Type;
  29.    ACL_List : Starlet.Item_List_Type (1..1);
  30.    ACE_Entry: String (1..128);
  31.    len : system.unsigned_word := 4;
  32. begin
  33.    Lib.Create_dir ( status => status,
  34.             device_directory_spec => "[STUDENT.USERS.Z275.HELLO]" );
  35.    Starlet.Parse_ACL ( status => status,
  36.                aclstr => "(identifier=[users,leduc],access=" &
  37.                 "read+write+execute+delete+control)",
  38.                aclent => ACE_Entry );
  39.    ACL_List (1) := Starlet.Item_Rec_Type' (
  40.         Buf_Len => len,
  41.         Item_Code => Starlet.ACL_C_ADDACLENT,
  42.         Buf_Address => ACE_Entry'address,
  43.         Ret_Address => System.Address_Zero );
  44.    Starlet.Change_ACL ( Status => Status,
  45.             Objtyp => Starlet.ACL_C_FILE,
  46.             Objnam => "[STUDENT.USERS.Z275]HELLO.DIR",
  47.             Itmlst => ACL_List );
  48. end test;
  49.  
  50.  
  51. The Lib.Create_Dir successfully creates the directory. The manual
  52. mentions having to create the ACE Entry using Sys$Parse_ACL before
  53. calling Sys$Change_ACL. I am unclear as to how to set up the
  54. correct format and call the right procedures.
  55.  
  56. Any advice would be greatly appreciated. Thanks in advance.
  57.  
  58. Duc Le
  59. led@sunfs1.dsd.northrop.com
  60. leduc@minna.iit.edu
  61.