home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.os.vms:20291 comp.lang.ada:3862
- Newsgroups: comp.os.vms,comp.lang.ada
- Path: sparky!uunet!gatech!rpi!usc!sdd.hp.com!elroy.jpl.nasa.gov!ames!saimiri.primate.wisc.edu!aplcen.apl.jhu.edu!ddsdx2.jhuapl.edu!dlc
- From: dlc@ddsdx2.jhuapl.edu (Dave Collard x7468)
- Subject: Re: VAX/VMS ACLs
- Message-ID: <1993Jan4.153639.7170@aplcen.apl.jhu.edu>
- Sender: news@aplcen.apl.jhu.edu (USENET News System)
- Organization: Johns Hopkins University
- References: <1993Jan4.042315.31541@iitmax.iit.edu>
- Distribution: usa
- Date: Mon, 4 Jan 93 15:36:39 GMT
- Lines: 44
-
- In <1993Jan4.042315.31541@iitmax.iit.edu> LEDUC@MINNA.IIT.EDU (USERS) writes:
-
- >I have the following program I am tring to set the
- >ACL on a file using system services.
-
- >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,
-
- *** this is your problem. the buf_len must be the length of the acl entry. this is
- in the first byte of the aclent. so convert ace_entry(1) to an unsigned word and
- use that value for buf_len. otherwise you will get a invalid access entry format error
-
- > Item_Code => Starlet.ACL_C_ADDACLENT,
- > Buf_Address => ACE_Entry'address,
- > Ret_Address => System.Address_Zero );
-
- *** your item list should also be terminated by a null item
- acl_list(2) := (0,0,system.address_zero,system.address_zero);
- if you don't do this, then will try to use the next area in memory
- as another item, and *hopefully* you will get a bad parameter error.
-
- > Starlet.Change_ACL ( Status => Status,
- > Objtyp => Starlet.ACL_C_FILE,
- > Objnam => "[STUDENT.USERS.Z275]HELLO.DIR",
- > Itmlst => ACL_List );
- >end test;
-
-
-