(go to: table of contents, index, list of vms_sys, prev: NUMUTC, next: PROCESS_SCAN)
PARSE_ACL - Parse Access Control List Entry
Parses the specified text string and converts it to the binary
representation for an access control entry (ACE).
Format:
11-JUL-1999 ZE.
status, errpos, aclent = vms_sys.parse_acl
(aclstr ,[accnam] ,[nullarg])
Returns:
Arguments:
Examples:
>>> import vms_sys
>>>
>>> aclstr = '(identifier= [1,4], access= read+write)'
>>>
>>> status, errpos, aclent = vms_sys.parse_acl (aclstr)
>>> print vms_sys.getmsg (status)
('%SYSTEM-S-NORMAL, normal successful completion', (0, 0, 0, 0))
>>> print errpos
39
>>> print len(aclstr)
39
>>> print repr(aclent)
'\014\001\000\000\003\000\000\000\004\000\001\000'
>>> # note that this is OCTAL representation
>>> aclstr = '(identifier= [2,7], access= read+submit)'
>>>
>>> # default is to use FILE access names
>>> status, errpos, aclent = vms_sys.parse_acl (aclstr, None)
>>> print vms_sys.getmsg (status)
%SYSTEM-F-IVACL, invalid access control list entry syntax
>>> print errpos
20
>>> print repr (aclstr[errpos:])
'access= read+submit)'
>>> print repr(aclent)
''
>>>
>>> import vms_lib
>>>
>>> # get access names table of QUEUE
>>> accnam_queue = vms_lib.get_accnam ('QUEUE')
>>> print accnam_queue
<vmsobj__access_names, ACCESS_NAMES at 0x002b6a20>
>>> status, errpos, aclent = vms_sys.parse_acl (aclstr, accnam_queue)
>>> print vms_sys.getmsg (status)
%SYSTEM-S-NORMAL, normal successful completion
>>> print errpos
40
>>> print len(aclstr)
40
>>> print repr(aclent)
'\014\001\000\000\003\000\000\000\007\000\002\000'
>>> # note that this is OCTAL representation
@@ more vms_sys.parse_acl() examples
>>>
(go to: table of contents,
index, list of vms_sys,
prev: NUMUTC,
next: PROCESS_SCAN)