# HG changeset patch # User jfp <jf.pieronne@laposte.net> # Date 1587895033 -7200 # Sun Apr 26 11:57:13 2020 +0200 # Node ID 3eb95908b332da99c695e18db932752a44c61e49 # Parent 9050c7b39add230561b243dd179a6191ac13dc5b Fix incorrect character in export format string diff --git a/secrules/rules01.py b/secrules/rules01.py --- a/secrules/rules01.py +++ b/secrules/rules01.py @@ -26,7 +26,7 @@ for u in all_users.values(): if (u.uic_group <= maxsysgroup) and (u.dialup_access_p != '\xff\xff\xff'): if ftm: - print >>fo, '0101�1� %-12s [%o,%o]' % (u.username, u.uic_group, u.uic_member) + print >>fo, '0101"1" %-12s [%o,%o]' % (u.username, u.uic_group, u.uic_member) else: print >>fo, '%-12s [%o,%o]' % (u.username, u.uic_group, u.uic_member) @@ -53,7 +53,7 @@ for uic in uics: if len(uics[uic]) > 1: if ftm: - print >>fo, '0102�2�', uic, uics[uic] + print >>fo, '0102"2"', uic, uics[uic] else: print >>fo, uic, uics[uic] @@ -73,7 +73,7 @@ if (u.uic_group <= maxsysgroup): if (u.priv | u.def_priv) & (prvdef.PRV_M_GROUP | prvdef.PRV_M_GRPPRV): if ftm: - print >>fo, '0103�3�', u.username + print >>fo, '0103"3"', u.username else: print >>fo, u.username @@ -96,7 +96,7 @@ for u in all_users.values(): if (u.uic_group <= maxsysgroup) and (u.username != 'SYSTEM'): if ftm: - print >>fo, '0104�3�', u.username + print >>fo, '0104"3"', u.username else: print >>fo, u.username @@ -157,7 +157,7 @@ if (u.uic_group > maxsysgroup): if (u.priv | u.def_priv) & privs: if ftm: - print >>fo, '0105�3�', u.username + print >>fo, '0105"3"', u.username else: print >>fo, u.username @@ -177,7 +177,7 @@ lib.getdvi(dvidef.DVI__DEVNAM, None, u.defdev) except: if ftm: - print >>fo, '0106�3�', u.username + print >>fo, '0106"3"', u.username else: print >>fo, u.username, u.defdev @@ -197,7 +197,7 @@ lib.getdvi(dvidef.DVI__AVL, None, u.defdev) except: if ftm: - print >>fo, '0107�3�', u.username + print >>fo, '0107"3"', u.username else: print >>fo, u.username, u.defdev @@ -217,7 +217,7 @@ for u in all_users.values(): if (u.defdir == '') and (u.defdev == ''): if ftm: - print >>fo, '0108�2�', u.username + print >>fo, '0108"2"', u.username else: print >>fo, u.username @@ -238,7 +238,7 @@ u = all_users['DEFAULT'] if (u.def_priv != u.priv) or (u.priv & ~privs) or (u.flags & uaidef.UAI_M_DISACNT) == 0: if ftm: - print >>fo, '0109�3�', u.username + print >>fo, '0109"3"', u.username else: print >>fo, u.username @@ -257,7 +257,7 @@ u = all_users['FIELD'] if (u.def_priv != u.priv) or (u.priv & ~privs) or (u.flags & uaidef.UAI_M_DISACNT) == 0: if ftm: - print >>fo, '0109�3�', u.username + print >>fo, '0109"3"', u.username else: print >>fo, u.username @@ -282,7 +282,7 @@ u = all_users['SYSTEST'] if (u.def_priv != u.priv) or (u.priv & ~privs) or (u.flags & uaidef.UAI_M_DISACNT) == 0: if ftm: - print >>fo, '0109�3�', u.username + print >>fo, '0109"3"', u.username else: print >>fo, u.username @@ -290,7 +290,7 @@ u = all_users['SYSTEST_CLIG'] if (u.def_priv != u.priv) or (u.priv & ~privs) or (u.flags & uaidef.UAI_M_DISACNT) == 0: if ftm: - print >>fo, '0109�3�', u.username + print >>fo, '0109"3"', u.username else: print >>fo, u.username @@ -312,17 +312,17 @@ if (load_pwd_policy != 0): if ftm: - print >>fo, '0110�3�LOAD_PWD_POLICY', load_pwd_policy + print >>fo, '0110"3"LOAD_PWD_POLICY', load_pwd_policy else: print >>fo, 'LOAD_PWD_POLICY invalid', load_pwd_policy if (maxsysgroup > 8): if ftm: - print >>fo, '0110�3�MAXSYSGROUP', maxsysgroup + print >>fo, '0110"3"MAXSYSGROUP', maxsysgroup else: print >>fo, 'MAXSYSGROUP invalid' , maxsysgroup if (rms_fileprot != 65280): if ftm: - print >>fo, '0110�3�RMS_FILEPROT', lib.format_sogw_prot (rms_fileprot)[1] + print >>fo, '0110"3"RMS_FILEPROT', lib.format_sogw_prot (rms_fileprot)[1] else: print >>fo, 'RMS_FILEPROT invalid found', lib.format_sogw_prot (rms_fileprot)[1] print >>fo, ' waiting', lib.format_sogw_prot (65280)[1] diff --git a/secrules/rules02.py b/secrules/rules02.py --- a/secrules/rules02.py +++ b/secrules/rules02.py @@ -34,7 +34,7 @@ itmlst=it)[1][ossdef.OSS__PROTECTION] if not ((sec & 0x8000) and (sec & 0x2000)): if fmt: - print>>fo, '0201�2�', fn + print>>fo, '0201"2"', fn else: print>>fo, fn print>>fo, ' ' * 10, lib.format_sogw_prot (sec)[1] @@ -62,7 +62,7 @@ sec = starlet.get_security (objnam=fn, clsnam='FILE',itmlst=it)[1][ossdef.OSS__PROTECTION] if not ((sec & 0x800) and (sec & 0x200)): if fmt: - print>>fo, '0202�3�', fn + print>>fo, '0202"3"', fn else: print>>fo, fn print>>fo, ' ' * 10, lib.format_sogw_prot (sec)[1] diff --git a/secrules/rules03.py b/secrules/rules03.py --- a/secrules/rules03.py +++ b/secrules/rules03.py @@ -22,7 +22,7 @@ if (id != 'SYSTEM') and (id != '[1,1]'): if (fn != 'MOM$SYSTEM') and (id != '[376,375]'): if fmt: - print>>fo, '0302�2�', fn + print>>fo, '0302"2"', fn else: print>>fo, fn print>>fo, ' ' * 10, id diff --git a/secrules/rules04.py b/secrules/rules04.py --- a/secrules/rules04.py +++ b/secrules/rules04.py @@ -34,7 +34,7 @@ acllen = int(retacl[1][ossdef.OSS__ACL_LENGTH]) if (acllen != 0): if fmt: - print>>fo, '0401�2�', fn + print>>fo, '0401"2"', fn else: print>>fo, fn for e in get_security.get_security (fn)[2]: @@ -68,7 +68,7 @@ own = get_security.get_security(fn)[0] if own not in ('SYSTEM', '[1,1]'): if fmt: - print>>fo, '0403�2�', fn + print>>fo, '0403"2"', fn else: print>>fo, fn, own @@ -103,7 +103,7 @@ prot = get_security.get_security(fn)[1] if not (prot == 'System: RWED, Owner: RWED, Group: RE, World'): if fmt: - print>>fo, '0404�2�', fn + print>>fo, '0404"2"', fn else: print>>fo, fn, prot @@ -140,7 +140,7 @@ acllen = int (starlet.get_security (objnam=fn, clsnam='FILE',itmlst=it)[1][ossdef.OSS__ACL_LENGTH]) if (acllen != 0): if fmt: - print>>fo, '0405�2�', fn + print>>fo, '0405"2"', fn else: print>>fo, fn for e in get_security.get_security (fn)[2]: diff --git a/secrules/rules05.py b/secrules/rules05.py --- a/secrules/rules05.py +++ b/secrules/rules05.py @@ -27,7 +27,7 @@ for u in all_users.values(): if not (u.flags & uaidef.UAI_M_DISCTLY): if fmt: - print>>fo, '0501�3�', u.username + print>>fo, '0501"3"', u.username else: print>>fo, u.username @@ -43,7 +43,7 @@ for u in all_users.values(): if not (u.flags & uaidef.UAI_M_DEFCLI): if fmt: - print>>fo, '0502�3�', u.username + print>>fo, '0502"3"', u.username else: print>>fo, u.username @@ -63,7 +63,7 @@ if (u.flags & uaidef.UAI_M_CAPTIVE): if (u.flags & uaidef.UAI_M_LOCKPWD) or (u.uic_group <= maxsysgroup): if fmt: - print>>fo, '0503�2�', u.username + print>>fo, '0503"2"', u.username else: print>>fo, u.username, u.uic_group @@ -82,7 +82,7 @@ for u in all_users.values(): if (u.flags & uaidef.UAI_M_CAPTIVE) and ((u.uic_group <= maxsysgroup) or (u.prccnt != 0)): if fmt: - print>>fo, '0504�2�', u.username + print>>fo, '0504"2"', u.username else: print>>fo, u.username, u.uic_group, u.prccnt @@ -102,7 +102,7 @@ for u in all_users.values(): if (u.lastlogin_i == 0) and (u.lastlogin_n == 0) and not (u.flags & uaidef.UAI_M_DISACNT): if fmt: - print>>fo, '0506�2�', u.username + print>>fo, '0506"2"', u.username else: print>>fo, u.username @@ -123,7 +123,7 @@ for u in all_users.values(): if ((u.lastlogin_i < limit_time) and (u.lastlogin_n < limit_time )) and not (u.flags & uaidef.UAI_M_DISACNT): if fmt: - print>>fo, '0507�2�', u.username + print>>fo, '0507"2"', u.username else: print>>fo, u.username @@ -141,7 +141,7 @@ for u in all_users.values(): if (u.flags & uaidef.UAI_M_DISACNT): if fmt: - print>>fo, '0508�3�', u.username + print>>fo, '0508"3"', u.username else: print>>fo, u.username @@ -161,7 +161,7 @@ for u in all_users.values(): if (0 < u.expiration < current_time): if fmt: - print>>fo, '0509�3�', u.username + print>>fo, '0509"3"', u.username else: print>>fo, u.username @@ -192,7 +192,7 @@ r = lib.getsyi(p[1])[1] if cmp(r, p[2]) not in p[3:]: if fmt: - print>>fo, '0510�2�', p[0] + print>>fo, '0510"2"', p[0] else: print>>fo, p[0] diff --git a/secrules/rules06.py b/secrules/rules06.py --- a/secrules/rules06.py +++ b/secrules/rules06.py @@ -27,7 +27,7 @@ for proxy_node, proxy_user, default_user, local_users in DisplayProxy(): if '*' in (proxy_node, proxy_user): if fmt: - print>>fo, '0601�2�', proxy_node, proxy_user + print>>fo, '0601"2"', proxy_node, proxy_user else: print>>fo, proxy_node, proxy_user, default_user, local_users @@ -47,7 +47,7 @@ if (default_user != '*') and (default_user != ''): if user_exists(default_user)[0] is None: if fmt: - print>>fo, '0602�2�', proxy_node, proxy_user + print>>fo, '0602"2"', proxy_node, proxy_user else: print>>fo, '1', proxy_node, proxy_user, default_user print>>fo, proxy_node, proxy_user, default_user, local_users @@ -75,7 +75,7 @@ g, m = user_exists(default_user) if (g is not None) and (g <= maxsysgroup): if fmt: - print>>fo, '0603�2�', proxy_node, proxy_user + print>>fo, '0603"2"', proxy_node, proxy_user else: print>>fo, proxy_node, proxy_user, default_user for l in local_users: @@ -103,7 +103,7 @@ for t, u, i in r: if user_exists(u)[0] is None: if fmt: - print>>fo, '0604�2�', t, u + print>>fo, '0604"2"', t, u else: print>>fo, t, u @@ -124,7 +124,7 @@ g, m = user_exists(u) if (g is not None) and (g <= maxsysgroup): if fmt: - print>>fo, '0605�2�', t, u + print>>fo, '0605"2"', t, u else: print>>fo, t, u @@ -144,7 +144,7 @@ for t, u, i in r: if not file_exists(i): if fmt: - print>>fo, '0606�3�', t, u, i + print>>fo, '0606"3"', t, u, i else: print>>fo, t, u, i @@ -167,7 +167,7 @@ for t, u, i in r: if (t == 'TASK'): if fmt: - print>>fo, '0607�3�', t, u, i + print>>fo, '0607"3"', t, u, i else: print>>fo, t, u, i diff --git a/secrules/rules07.py b/secrules/rules07.py --- a/secrules/rules07.py +++ b/secrules/rules07.py @@ -33,14 +33,14 @@ s, idn, idv, ida = starlet.idtoasc(v) if idn != n: if fmt: - print>>fo, '0701�2�', '%s %x' % (n, v) + print>>fo, '0701"2"', '%s %x' % (n, v) else: print>>fo, '%s %x' % (n, v) except VMSError, e: if e.errno != ssdef.SS__NOSUCHID: print>>fo, e if fmt: - print>>fo, '0701�2�', '%s %x' % (n, v) + print>>fo, '0701"2"', '%s %x' % (n, v) else: print>>fo, '%s %x' % (n, v) @@ -75,7 +75,7 @@ raise e idvs = "%%X%X" % idv if fmt: - print>>fo, '0702�2�', "id = %s idn = %s" % (idvs, idn) + print>>fo, '0702"2"', "id = %s idn = %s" % (idvs, idn) else: print>>fo, "id = %s idn = %s" % (idvs, idn) except VMSError, e: @@ -106,7 +106,7 @@ own = "[%o,%o]" % (high_word, low_word) if own != '[1,4]': if fmt: - print>>fo, '0703�2�', own + print>>fo, '0703"2"', own else: print>>fo, own @@ -127,7 +127,7 @@ if not ((prot & 0x8000) and (prot & 0x4000) and (prot & 0x2000)): if fmt: - print>>fo, '0704�2� LNM$SYSTEM_TABLE' + print>>fo, '0704"2" LNM$SYSTEM_TABLE' else: print>>fo, 'LNM$SYSTEM_TABLE', lib.format_sogw_prot (prot)[1] @@ -148,7 +148,7 @@ if not ((prot & 0x800) and (prot & 0x400) and (prot & 0x200)): if fmt: - print>>fo, '0705�2� LNM$SYSTEM_TABLE' + print>>fo, '0705"2" LNM$SYSTEM_TABLE' else: print>>fo, 'LNM$SYSTEM_TABLE', lib.format_sogw_prot (prot)[1] @@ -168,7 +168,7 @@ if (acllen != 0): if fmt: - print>>fo, '0706�2� LNM$SYSTEM_TABLE' + print>>fo, '0706"2" LNM$SYSTEM_TABLE' else: print>>fo, get_security.get_security('LNM$SYSTEM_TABLE', clsnam='LOGICAL_NAME_TABLE') @@ -192,7 +192,7 @@ own = "[%o,%o]" % (high_word, low_word) if (own != '[1,4]') and (own != '[1,1]'): if fmt: - print>>fo, '0707�1� SYS$SYSDEVICE:' + print>>fo, '0707"1" SYS$SYSDEVICE:' else: print>>fo, 'SYS$SYSDEVICE:', own @@ -219,13 +219,13 @@ g, m =user_exists.user_exists(r[1]) if g is None: if fmt: - print>>fo, '0708�2� SYS$SYSDEVICE:', r[1] + print>>fo, '0708"2" SYS$SYSDEVICE:', r[1] else: print>>fo, 'SYS$SYSDEVICE:', r[1], own except VMSError, e: if e == ssdef.SS__NOSUCHID: if fmt: - print>>fo, '0708�2� SYS$SYSDEVICE:' + print>>fo, '0708"2" SYS$SYSDEVICE:' else: print>>fo, 'SYS$SYSDEVICE:', own else: @@ -248,7 +248,7 @@ if not (prot & 0xFE00): if fmt: - print>>fo, '0709�2� SYS$SYSDEVICE:' + print>>fo, '0709"2" SYS$SYSDEVICE:' else: print>>fo, 'SYS$SYSDEVICE:', lib.format_sogw_prot (prot)[1] @@ -270,7 +270,7 @@ continue if lib.getdvi (dvidef.DVI__NOHIGHWATER, device_name=device)[1]: if fmt: - print>>fo, '0710�2�', device + print>>fo, '0710"2"', device else: print>>fo, device, 'NOHIGHWATER' @@ -293,7 +293,7 @@ continue if not lib.getdvi (dvidef.DVI__ERASE_ON_DELETE, device_name=device)[1]: if fmt: - print>>fo, '0711�2�', device + print>>fo, '0711"2"', device else: print>>fo, device, 'NO ERASE_ON_DELETE' @@ -317,7 +317,7 @@ if (own != '[1,4]') and (own != '[1,1]'): if fmt: - print>>fo, '0712�2� Device SYS$SYSDEVICE:' + print>>fo, '0712"2" Device SYS$SYSDEVICE:' else: print>>fo, 'Device SYS$SYSDEVICE:', own @@ -346,13 +346,13 @@ g, m =user_exists.user_exists(r[1]) if g is None: if fmt: - print>>fo, '0713�2� Volume SYS$SYSDEVICE:' + print>>fo, '0713"2" Volume SYS$SYSDEVICE:' else: print>>fo, 'SYS$SYSDEVICE:', r[1], own except VMSError, e: if e == ssdef.SS__NOSUCHID: if fmt: - print>>fo, '0713�2� Volume SYS$SYSDEVICE:' + print>>fo, '0713"2" Volume SYS$SYSDEVICE:' else: print>>fo, 'SYS$SYSDEVICE:', own else: @@ -376,7 +376,7 @@ pvw = lib.format_sogw_prot (prot,access_names=accnam)[1].split(',')[3] if pvw[8:] != 'RWCD': if fmt: - print >>fo, '0714�2�SYS$SYSDEVICE:', pvw + print >>fo, '0714"2"SYS$SYSDEVICE:', pvw else: print >>fo, 'SYS$SYSDEVICE: bad World protection', pvw diff --git a/secrules/rules08.py b/secrules/rules08.py --- a/secrules/rules08.py +++ b/secrules/rules08.py @@ -26,7 +26,7 @@ if (u.flags & uaidef.UAI_M_DISACNT): du = 'DisUser' if fmt: - print>>fo, '0801�1�', u.username, du + print>>fo, '0801"1"', u.username, du else: print>>fo, u.username, u.pwd_length, du @@ -54,7 +54,7 @@ if (u.flags & uaidef.UAI_M_DISACNT): du = 'DisUser' if fmt: - print>>fo, '0802�2�', u.username, du + print>>fo, '0802"2"', u.username, du else: print>>fo, u.username, du @@ -82,7 +82,7 @@ if (u.flags & uaidef.UAI_M_DISACNT): du = 'DisUser' if fmt: - print>>fo, '0803�2�', u.username, du + print>>fo, '0803"2"', u.username, du else: print>>fo, u.username, du @@ -108,7 +108,7 @@ if (u.flags & uaidef.UAI_M_DISACNT): du = 'DisUser' if fmt: - print>>fo, '0804�2�', u.username, du + print>>fo, '0804"2"', u.username, du else: print>>fo, u.username, u.pwd_length, du @@ -136,7 +136,7 @@ if (u.flags & uaidef.UAI_M_DISACNT): du = 'DisUser' if fmt: - print>>fo, '0805�2�', u.username, du + print>>fo, '0805"2"', u.username, du else: print>>fo, u.username, u.pwd_lifetime, du diff --git a/secrules/rules09.py b/secrules/rules09.py --- a/secrules/rules09.py +++ b/secrules/rules09.py @@ -30,7 +30,7 @@ (prot & 0x2000) and (prot & 0x1000)): if fmt: - print>>fo, '0901�2�', fn + print>>fo, '0901"2"', fn else: print>>fo, fn print>>fo, ' ' * 10, lib.format_sogw_prot (prot)[1] @@ -53,7 +53,7 @@ for pi in p: if pok: if fmt: - print >>fo, '0902�3�', pi, + print >>fo, '0902"3"', pi, else: print >>fo, pi, pok = not pok @@ -75,7 +75,7 @@ for fn in lsf: if not file_exists(fn): if fmt: - print>>fo, '0903�2�', fn + print>>fo, '0903"2"', fn else: print>>fo, fn diff --git a/secrules/rules10.py b/secrules/rules10.py --- a/secrules/rules10.py +++ b/secrules/rules10.py @@ -19,7 +19,7 @@ break if 'disable' in a: if fmt: - print >>fo, '1001�2� Accounting is disable' + print >>fo, '1001"2" Accounting is disable' else: print >>fo, 'Accounting is disable' break @@ -42,7 +42,7 @@ f = True if not f: if fmt: - print >>fo, '1002�2� LOGIN_FAILURE not accounted' + print >>fo, '1002"2" LOGIN_FAILURE not accounted' else: print >>fo, 'LOGIN_FAILURE not accounted' @@ -61,7 +61,7 @@ break if 'disable' in a: if fmt: - print >>fo, '1003�1� Alarms auditing is disable' + print >>fo, '1003"1" Alarms auditing is disable' else: print >>fo, 'Alarms auditing is disable' break @@ -84,12 +84,12 @@ acl = True if not brk: if fmt: - print >>fo, '1004�2� Breakin not audited (alarm)' + print >>fo, '1004"2" Breakin not audited (alarm)' else: print >>fo, 'Breakin not audited (alarm)' if not acl: if fmt: - print >>fo, '1004�2� ACL not audited (alarm)' + print >>fo, '1004"2" ACL not audited (alarm)' else: print >>fo, 'ACL not audited (alarm)' @@ -109,7 +109,7 @@ break if 'disable' in a: if fmt: - print >>fo, '1006�1� Report auditing is disable' + print >>fo, '1006"1" Report auditing is disable' else: print >>fo, 'Report auditing is disable' break @@ -146,22 +146,22 @@ lgf = True if not brk: if fmt: - print >>fo, '1007�2�', brk_lst + print >>fo, '1007"2"', brk_lst else: print >>fo, brk_lst if not acl: if fmt: - print >>fo, '1007�2� ACL not audited' + print >>fo, '1007"2" ACL not audited' else: print >>fo, 'ACL not audited' if not aut: if fmt: - print >>fo, '1007�2� Authorization not audited' + print >>fo, '1007"2" Authorization not audited' else: print >>fo, 'Authorization not audited' if not lgf: if fmt: - print >>fo, '1007�2�', lgf_list + print >>fo, '1007"2"', lgf_list else: print lgf_list diff --git a/secrules/rules11.py b/secrules/rules11.py --- a/secrules/rules11.py +++ b/secrules/rules11.py @@ -27,7 +27,7 @@ for e in r: if not (e == ''): if fmt: - print>>fo, '1101�2�', e + print>>fo, '1101"2"', e else: print>>fo, e @@ -51,7 +51,7 @@ prot = starlet.get_security(objnam=df, clsnam='FILE',itmlst=it)[1][ossdef.OSS__PROTECTION] if (prot != 0xFFCC): if fmt: - print>>fo, '1102�2�', df + print>>fo, '1102"2"', df else: print>>fo, df print>>fo, ' ' * 10, lib.format_sogw_prot (prot)[1] @@ -78,7 +78,7 @@ m = int(own - (g *65536)) if (u.uic_group != g) or (u.uic_member != m): if fmt: - print>>fo, '1103�2�', u.username + print>>fo, '1103"2"', u.username else: print>>fo, "%s [%o,%o] %s [%o,%o]" % (df, g, m, u.username, u.uic_group, u.uic_member) @@ -100,7 +100,7 @@ if p: if fmt: - print>>fo, '1104�3� MAIL object present' + print>>fo, '1104"3" MAIL object present' else: print>>fo, 'MAIL object present' @@ -117,7 +117,7 @@ if not a: if fmt: - print>>fo, '1105�4� Account MAIL$SERVER missing' + print>>fo, '1105"4" Account MAIL$SERVER missing' else: print>>fo, 'Account MAIL$SERVER missing' @@ -135,7 +135,7 @@ p, a, u = getMailObjectInfo() if a and not (u.flags & uaidef.UAI_M_RESTRICTED): if fmt: - print>>fo, '1106�2� Account MAIL$SERVER not RESTRICTED' + print>>fo, '1106"2" Account MAIL$SERVER not RESTRICTED' else: print>>fo, 'Account MAIL$SERVER not RESTRICTED' @@ -156,7 +156,7 @@ if (u.uic_group <= lib.getsyi(syidef.SYI__MAXSYSGROUP)[1]): if fmt: - print>>fo, '1107�2� Account MAIL$SERVER have System Group' + print>>fo, '1107"2" Account MAIL$SERVER have System Group' else: print>>fo, "%s [%o,%o]" % ('Account MAIL$SERVER System Group', u.uic_group, u.uic_member) @@ -175,7 +175,7 @@ if (u.flags & uaidef.UAI_M_DISACNT): if fmt: - print>>fo, '1108�4� Account MAIL$SERVER is DISUSER' + print>>fo, '1108"4" Account MAIL$SERVER is DISUSER' else: print>>fo, 'Account MAIL$SERVER is DISUSER' @@ -195,7 +195,7 @@ if (u.pwd_length < 8): if fmt: - print>>fo, '1109�1� Account MAIL$SERVER Password Length' + print>>fo, '1109"1" Account MAIL$SERVER Password Length' else: print>>fo, 'Account MAIL$SERVER Password Length', u.pwd_length @@ -214,7 +214,7 @@ if ((u.network_access_p != '\x00\x00\x00') and (u.network_access_s != '\x00\x00\x00')): if fmt: - print>>fo, '1110�4� MAIL$SERVER no Netwrok Access' + print>>fo, '1110"4" MAIL$SERVER no Netwrok Access' else: print>>fo, 'Account MAIL$SERVER no Netwrok Access' @@ -237,21 +237,21 @@ if ((u.batch_access_p != '\xff\xff\xff') and (u.batch_access_s != '\xff\xff\xff')): if fmt: - print>>fo, '1111�2� MAIL$SERVER have REMOTE Access' + print>>fo, '1111"2" MAIL$SERVER have REMOTE Access' else: print>>fo, 'Account MAIL$SERVER have REMOTE Access' if ((u.remote_access_p != '\xff\xff\xff') and (u.remote_access_s != '\xff\xff\xff')): if fmt: - print>>fo, '1111�2� MAIL$SERVER have REMOTE Access' + print>>fo, '1111"2" MAIL$SERVER have REMOTE Access' else: print>>fo, 'Account MAIL$SERVER have REMOTE Access' if ((u.dialup_access_p != '\xff\xff\xff') and (u.dialup_access_s != '\xff\xff\xff')): if fmt: - print>>fo, '1111�2� MAIL$SERVER have DIALUP Access' + print>>fo, '1111"2" MAIL$SERVER have DIALUP Access' else: print>>fo, 'Account MAIL$SERVER have DIALUP Access' @@ -270,23 +270,23 @@ if not (u.priv & prvdef.PRV_M_NETMBX): if fmt: - print>>fo, '1112�4� Account MAIL$SERVER privilege NETMBX missing' + print>>fo, '1112"4" Account MAIL$SERVER privilege NETMBX missing' else: print>>fo, 'Account MAIL$SERVER privilege NETMBX missing' if not (u.def_priv & prvdef.PRV_M_NETMBX): if fmt: - print>>fo, '1112�4� Account MAIL$SERVER default privilege NETMBX missing' + print>>fo, '1112"4" Account MAIL$SERVER default privilege NETMBX missing' else: print>>fo, 'Account MAIL$SERVER default privilege NETMBX missing' if not (u.priv & prvdef.PRV_M_TMPMBX): if fmt: - print>>fo, '1112�4� Account MAIL$SERVER privilege TMPMBX missing' + print>>fo, '1112"4" Account MAIL$SERVER privilege TMPMBX missing' else: print>>fo, 'Account MAIL$SERVER privilege TMPMBX missing' if not (u.def_priv & prvdef.PRV_M_TMPMBX): if fmt: - print>>fo, '1112�4� Account MAIL$SERVER default privilege TMPMBX missing' + print>>fo, '1112"4" Account MAIL$SERVER default privilege TMPMBX missing' else: print>>fo, 'Account MAIL$SERVER default privilege TMPMBX missing' @@ -309,12 +309,12 @@ msk_prv = prvdef.PRV_M_NETMBX | prvdef.PRV_M_TMPMBX if (u.def_priv ^msk_prv) != 0: if fmt: - print>>fo, '1113�2� Account MAIL$SERVER excessive default privileges' + print>>fo, '1113"2" Account MAIL$SERVER excessive default privileges' else: print>>fo, 'Account MAIL$SERVER excessive default privileges' if (u.priv ^msk_prv) != 0: if fmt: - print>>fo, '1113�2� Account MAIL$SERVER excessive privileges' + print>>fo, '1113"2" Account MAIL$SERVER excessive privileges' else: print>>fo, 'Account MAIL$SERVER excessive privileges' @@ -335,7 +335,7 @@ m = int(own - (g *65536)) if (g != 1) or (m != 4): if fmt: - print>>fo, '1114�2� SYS$SYSTEM:VMSMAIL_PROFILE.DATA bad owner' + print>>fo, '1114"2" SYS$SYSTEM:VMSMAIL_PROFILE.DATA bad owner' else: print>>fo, "%s [%o,%o]" % ('SYS$SYSTEM:VMSMAIL_PROFILE.DATA bad owner', g, m,) @@ -354,7 +354,7 @@ if (prot != 0xFF88): if fmt: - print>>fo, '1115�2� SYS$SYSTEM:VMSMAIL_PROFILE.DATA bad protection' + print>>fo, '1115"2" SYS$SYSTEM:VMSMAIL_PROFILE.DATA bad protection' else: print>>fo, 'SYS$SYSTEM:VMSMAIL_PROFILE.DATA', lib.format_sogw_prot (prot)[1] @@ -370,7 +370,7 @@ if not file_exists('SYS$SYSTEM:MAIL_SERVER.EXE'): if fmt: - print >>fo, '1116�2�SYS$SYSTEM:MAIL_SERVER.EXE not exists' + print >>fo, '1116"2"SYS$SYSTEM:MAIL_SERVER.EXE not exists' else: print >>fo, 'SYS$SYSTEM:MAIL_SERVER.EXE not exists' diff --git a/secrules/rules12.py b/secrules/rules12.py --- a/secrules/rules12.py +++ b/secrules/rules12.py @@ -23,7 +23,7 @@ m = int(own - (g *65536)) if (g != 1) or (m != 4): if fmt: - print >>fo, '1201�2�', nam + print >>fo, '1201"2"', nam else: print >>fo, "%s [%o,%o]" % (nam, g, m) @@ -40,7 +40,7 @@ prot = q.protection if (prot != 0xDE7B): if fmt: - print >>fo, '1202�2�', nam + print >>fo, '1202"2"', nam else: prt = lib.format_sogw_prot(prot, access_names=accname)[1] print >>fo, nam, prt @@ -56,7 +56,7 @@ qsts = q.queue_status if (qsts & quidef.QUI_M_QUEUE_STOPPED): if fmt: - print >>fo, '1203�3�', nam + print >>fo, '1203"3"', nam else: print >>fo, nam, 'Stopped' diff --git a/secrules/rules13.py b/secrules/rules13.py --- a/secrules/rules13.py +++ b/secrules/rules13.py @@ -37,7 +37,7 @@ fn = u.defdev + u.defdir + '*.*' if (path_exists(fn) == 2): if fmt: - print >>fo, '1301�3�', fn + print >>fo, '1301"3"', fn else: print >>fo, fn, 'not exists', u.username @@ -72,7 +72,7 @@ (prot & 0x200) or (prot & 0x100)): if fmt: - print >>fo, '1303�2�', f + print >>fo, '1303"2"', f else: print >>fo, f print >>fo, ' ' * 10, lib.format_sogw_prot (prot)[1] @@ -103,7 +103,7 @@ if high != u.uic_group or low != u.uic_member: mark = '*' if high == 1 and low in (1, 4) else '' if fmt: - print >>fo, '1304�2�', mark, u.username + print >>fo, '1304"2"', mark, u.username else: print >>fo, mark, u.username @@ -127,7 +127,7 @@ continue if lgicmd == '' or not file_exists(lgicmd): if fmt: - print >>fo, '1310�3�', u.username + print >>fo, '1310"3"', u.username else: print >>fo, u.username,lgicmd diff --git a/secrules/rules15.py b/secrules/rules15.py --- a/secrules/rules15.py +++ b/secrules/rules15.py @@ -27,7 +27,7 @@ else: v = '%s %s' % (s[0], s[5]) if fmt: - print >>fo, '1501�1�', v + print >>fo, '1501"1"', v else: print >>fo, v