home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.os.vms:20257 comp.lang.ada:3857
- Newsgroups: comp.os.vms,comp.lang.ada
- Path: sparky!uunet!cs.utexas.edu!asuvax!ncar!uchinews!iitmax!news
- From: LEDUC@MINNA.IIT.EDU (USERS)
- Subject: VAX/VMS ACLs
- Message-ID: <1993Jan4.042315.31541@iitmax.iit.edu>
- Sender: news@iitmax.iit.edu (News)
- Organization: ILLINOIS INSTITUTE OF TECHNOLOGY, CHICAGO
- Date: Mon, 4 Jan 93 04:23:15 GMT
- X-News-Reader: VMS NEWS 1.24
- Lines: 48
-
- Hi Everyone,
-
- I'm kinda of new to VAX/VMS ADA. I was wondering whether someone out
- there can help. I have the following program I am tring to set the
- ACL on a file using system services. I have already tried spawning
- a subprocess to set the ACL, But spawning cost a great deal of CPU time.
- I was hoping using system servies would be faster, but I am unable
- to get it to work.
-
- with Condition_Handling;
- with Lib;
- with starlet;
- with system;
-
- procedure test is
- status : Condition_handling.Cond_Value_Type;
- ACL_List : Starlet.Item_List_Type (1..1);
- ACE_Entry: String (1..128);
- len : system.unsigned_word := 4;
- begin
- Lib.Create_dir ( status => status,
- device_directory_spec => "[STUDENT.USERS.Z275.HELLO]" );
- Starlet.Parse_ACL ( status => status,
- aclstr => "(identifier=[users,leduc],access=" &
- "read+write+execute+delete+control)",
- aclent => ACE_Entry );
- ACL_List (1) := Starlet.Item_Rec_Type' (
- Buf_Len => len,
- Item_Code => Starlet.ACL_C_ADDACLENT,
- Buf_Address => ACE_Entry'address,
- Ret_Address => System.Address_Zero );
- Starlet.Change_ACL ( Status => Status,
- Objtyp => Starlet.ACL_C_FILE,
- Objnam => "[STUDENT.USERS.Z275]HELLO.DIR",
- Itmlst => ACL_List );
- end test;
-
-
- The Lib.Create_Dir successfully creates the directory. The manual
- mentions having to create the ACE Entry using Sys$Parse_ACL before
- calling Sys$Change_ACL. I am unclear as to how to set up the
- correct format and call the right procedures.
-
- Any advice would be greatly appreciated. Thanks in advance.
-
- Duc Le
- led@sunfs1.dsd.northrop.com
- leduc@minna.iit.edu
-