1 /* BEGIN INCLUDE FILE gtss_filact_intp5.incl.pl1 */
 2 /*
 3   Created: (Wardd Multics)  10/05/78 1602.7 mst Thu
 4   Modified  Ron Barstad  82-09-23  to fix unspec-substr err of permission bit
 5 */
 6 get_multics_seg_acl: proc (n, opp, sap);
 7 
 8 /**       Obtain a list of (n) Multics segment access mode values
 9           in the segment_acl structure (based sap) from a
10           filact options list (based opp).
11 **/
12 dcl  n                        fixed bin parm;
13 dcl  opp                      ptr parm;
14 dcl  sap                      ptr parm;
15 
16           op = opp;
17           acl_ptr = sap;
18           acl_count = max_options;
19 
20           ln = n;                                           /* Local n. */
21           do i = 1 to ln while (i <= max_options);
22                                                             /* Ignore create permission.      Ignore delete also. */
23                if substr (unspec (permission_bit (i)), 1, 10) ^= "0000000010"b & unspec (permission_bit (i)) ^= "0"b then do;
24                     k = k+1;
25                     if permission_bit.bits10_35 (i) = "00000001"b then segment_acl.modes (k) = "0"b; /* Exclude => null */
26                     else segment_acl.modes (k) = "1"b||permission_bit.e (i)||permission_bit.w (i);
27                     call gtss_bcd_ascii_ (addr (ol (i).USERID), 12, addr (id));
28                     segment_acl.access_name (k) = "*."||rtrim (id)||".*";
29                end;
30           end;
31           return;
32 
33 dcl 1 ol (ln)aligned based(op) like optionsx.optional_specific_permissions;
34 dcl  id                       char(12)aligned;
35 dcl  ln                       fixed bin;
36 dcl  op                       ptr init(null());
37      end                                                    /* get_multics_seg_acl */;
38 /**       Multics include file "acls".  **/
39 %include acls;
40 /*   END INCLUDE FILE gtss_filact_intp5.incl.pl1 */