diff --git a/secrules/rules02.py b/secrules/rules02.py index d052b3f28585ce273a491f2b0ff79465f619ebb4_c2VjcnVsZXMvcnVsZXMwMi5weQ==..26d029029aff6749b8ab567cc6062ecf137ff3e3_c2VjcnVsZXMvcnVsZXMwMi5weQ== 100644 --- a/secrules/rules02.py +++ b/secrules/rules02.py @@ -29,7 +29,8 @@ print('=========', file=fo) with FindFile(b'SYS$SYSROOT:[000000...]*.*') as fi: - for fn in fi: + for fn in fi: # type:ignore + fn: bytes it = ( itemList.itemList( code=ossdef.OSS__PROTECTION, dtype=itemList.il_unsignedWord diff --git a/secrules/rules09.py b/secrules/rules09.py index d052b3f28585ce273a491f2b0ff79465f619ebb4_c2VjcnVsZXMvcnVsZXMwOS5weQ==..26d029029aff6749b8ab567cc6062ecf137ff3e3_c2VjcnVsZXMvcnVsZXMwOS5weQ== 100644 --- a/secrules/rules09.py +++ b/secrules/rules09.py @@ -22,7 +22,7 @@ print('RULE 0901', file=fo) print('=========', file=fo) - it = [ + it = ( itemList.itemList( code=ossdef.OSS__PROTECTION, dtype=itemList.il_unsignedWord ), @@ -26,7 +26,7 @@ itemList.itemList( code=ossdef.OSS__PROTECTION, dtype=itemList.il_unsignedWord ), - ] + ) with FindFile(b'SYS$STARTUP:*.*', b'') as ifn: for fn in ifn: # type: ignore fn: bytes diff --git a/secrules/rules11.py b/secrules/rules11.py index d052b3f28585ce273a491f2b0ff79465f619ebb4_c2VjcnVsZXMvcnVsZXMxMS5weQ==..26d029029aff6749b8ab567cc6062ecf137ff3e3_c2VjcnVsZXMvcnVsZXMxMS5weQ== 100644 --- a/secrules/rules11.py +++ b/secrules/rules11.py @@ -84,7 +84,7 @@ all_users = user.all_users() - it = [ + it = ( itemList.itemList( code=ossdef.OSS__OWNER, dtype=itemList.il_unsignedLong ), @@ -88,7 +88,7 @@ itemList.itemList( code=ossdef.OSS__OWNER, dtype=itemList.il_unsignedLong ), - ] + ) for u in list(all_users.values()): df: bytes = u.defdev + u.defdir + b'MAIL.MAI' if file_exists(df): @@ -412,7 +412,7 @@ print('RULE 1114', file=fo) print('=========', file=fo) - it = [ + it = ( itemList.itemList( code=ossdef.OSS__OWNER, dtype=itemList.il_unsignedLong ), @@ -416,7 +416,7 @@ itemList.itemList( code=ossdef.OSS__OWNER, dtype=itemList.il_unsignedLong ), - ] + ) own: int = starlet.get_security( objnam='SYS$SYSTEM:VMSMAIL_PROFILE.DATA', clsnam='FILE', itmlst=it diff --git a/secrules/rules13.py b/secrules/rules13.py index d052b3f28585ce273a491f2b0ff79465f619ebb4_c2VjcnVsZXMvcnVsZXMxMy5weQ==..26d029029aff6749b8ab567cc6062ecf137ff3e3_c2VjcnVsZXMvcnVsZXMxMy5weQ== 100644 --- a/secrules/rules13.py +++ b/secrules/rules13.py @@ -112,7 +112,7 @@ if not fmt: print('RULE 1304', file=fo) print('=========', file=fo) - it = [ + it = ( itemList.itemList( code=ossdef.OSS__OWNER, dtype=itemList.il_unsignedLong ), @@ -116,7 +116,7 @@ itemList.itemList( code=ossdef.OSS__OWNER, dtype=itemList.il_unsignedLong ), - ] + ) all_users = user.all_users() for u in list(all_users.values()): fn: bytes = u.defdev + u.defdir diff --git a/secrules/rules14.py b/secrules/rules14.py index d052b3f28585ce273a491f2b0ff79465f619ebb4_c2VjcnVsZXMvcnVsZXMxNC5weQ==..26d029029aff6749b8ab567cc6062ecf137ff3e3_c2VjcnVsZXMvcnVsZXMxNC5weQ== 100644 --- a/secrules/rules14.py +++ b/secrules/rules14.py @@ -15,8 +15,8 @@ with os.popen('install list/full') as p: r = [x[:-1].rstrip() for x in p] - dspec = None - fspec = None + dspec = '' + fspec = '' priv = None auth = None hasPriv = False @@ -27,7 +27,7 @@ continue if l[0] != ' ': dspec = l.replace('.000000', '') - fspec = None + fspec = '' elif ';' in l: priv = auth = None hasPriv = False