diff --git a/secrules/rules02.py b/secrules/rules02.py index bfb6aa2d338bada366cc1f96d49c856cd30ff518_c2VjcnVsZXMvcnVsZXMwMi5weQ==..2ab83d86bb2946b1c4eac688dcab713598108df2_c2VjcnVsZXMvcnVsZXMwMi5weQ== 100644 --- a/secrules/rules02.py +++ b/secrules/rules02.py @@ -29,14 +29,18 @@ with FindFile('SYS$SYSROOT:[000000...]*.*') as fi: for fn in fi: it = [itemList.itemList(code = ossdef.OSS__PROTECTION, dtype = itemList.il_unsignedWord),] - sec = starlet.get_security(objnam=fn, clsnam='FILE', - itmlst=it)[1][ossdef.OSS__PROTECTION] - if not ((sec & 0x8000) and (sec & 0x2000)): - if fmt: - print>>fo, '0201�2�', fn - else: - print>>fo, fn - print>>fo, ' ' * 10, lib.format_sogw_prot (sec)[1] + try: + sec = starlet.get_security(objnam=fn, clsnam='FILE', + itmlst=it)[1][ossdef.OSS__PROTECTION] + if not ((sec & 0x8000) and (sec & 0x2000)): + if fmt: + print>>fo, '0201�2�', fn + else: + print>>fo, fn + print>>fo, ' ' * 10, lib.format_sogw_prot (sec)[1] + except VMSError, e: + if e.errno != ssdef.SS__NOSUCHFILE: + raise @level_rule(3) def rule0202(fo, fmt):