Skip to content
Snippets Groups Projects
Commit 9050c7b39add authored by jfp's avatar jfp
Browse files

Fix missing current_time variable rule0509

parent 98a3d3965eae
No related branches found
No related tags found
No related merge requests found
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
for u in all_users.values(): for u in all_users.values():
if not (u.flags & uaidef.UAI_M_DISCTLY): if not (u.flags & uaidef.UAI_M_DISCTLY):
if fmt: if fmt:
print>>fo, '05013', u.username print>>fo, '0501�3�', u.username
else: else:
print>>fo, u.username print>>fo, u.username
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
for u in all_users.values(): for u in all_users.values():
if not (u.flags & uaidef.UAI_M_DEFCLI): if not (u.flags & uaidef.UAI_M_DEFCLI):
if fmt: if fmt:
print>>fo, '05023', u.username print>>fo, '0502�3�', u.username
else: else:
print>>fo, u.username print>>fo, u.username
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
if (u.flags & uaidef.UAI_M_CAPTIVE): if (u.flags & uaidef.UAI_M_CAPTIVE):
if (u.flags & uaidef.UAI_M_LOCKPWD) or (u.uic_group <= maxsysgroup): if (u.flags & uaidef.UAI_M_LOCKPWD) or (u.uic_group <= maxsysgroup):
if fmt: if fmt:
print>>fo, '05032', u.username print>>fo, '0503�2�', u.username
else: else:
print>>fo, u.username, u.uic_group print>>fo, u.username, u.uic_group
...@@ -82,7 +82,7 @@ ...@@ -82,7 +82,7 @@
for u in all_users.values(): for u in all_users.values():
if (u.flags & uaidef.UAI_M_CAPTIVE) and ((u.uic_group <= maxsysgroup) or (u.prccnt != 0)): if (u.flags & uaidef.UAI_M_CAPTIVE) and ((u.uic_group <= maxsysgroup) or (u.prccnt != 0)):
if fmt: if fmt:
print>>fo, '05042', u.username print>>fo, '0504�2�', u.username
else: else:
print>>fo, u.username, u.uic_group, u.prccnt print>>fo, u.username, u.uic_group, u.prccnt
...@@ -102,7 +102,7 @@ ...@@ -102,7 +102,7 @@
for u in all_users.values(): 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 (u.lastlogin_i == 0) and (u.lastlogin_n == 0) and not (u.flags & uaidef.UAI_M_DISACNT):
if fmt: if fmt:
print>>fo, '05062', u.username print>>fo, '0506�2�', u.username
else: else:
print>>fo, u.username print>>fo, u.username
...@@ -123,7 +123,7 @@ ...@@ -123,7 +123,7 @@
for u in all_users.values(): 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 ((u.lastlogin_i < limit_time) and (u.lastlogin_n < limit_time )) and not (u.flags & uaidef.UAI_M_DISACNT):
if fmt: if fmt:
print>>fo, '05072', u.username print>>fo, '0507�2�', u.username
else: else:
print>>fo, u.username print>>fo, u.username
...@@ -141,7 +141,7 @@ ...@@ -141,7 +141,7 @@
for u in all_users.values(): for u in all_users.values():
if (u.flags & uaidef.UAI_M_DISACNT): if (u.flags & uaidef.UAI_M_DISACNT):
if fmt: if fmt:
print>>fo, '05083', u.username print>>fo, '0508�3�', u.username
else: else:
print>>fo, u.username print>>fo, u.username
...@@ -156,6 +156,8 @@ ...@@ -156,6 +156,8 @@
print>>fo, 'Rule 0509' print>>fo, 'Rule 0509'
print>>fo, '=========' print>>fo, '========='
current_time = starlet.bintim(starlet.asctim()[1])[1]
for u in all_users.values(): for u in all_users.values():
if (0 < u.expiration < current_time): if (0 < u.expiration < current_time):
if fmt: if fmt:
...@@ -159,7 +161,7 @@ ...@@ -159,7 +161,7 @@
for u in all_users.values(): for u in all_users.values():
if (0 < u.expiration < current_time): if (0 < u.expiration < current_time):
if fmt: if fmt:
print>>fo, '05093', u.username print>>fo, '0509�3�', u.username
else: else:
print>>fo, u.username print>>fo, u.username
...@@ -190,7 +192,7 @@ ...@@ -190,7 +192,7 @@
r = lib.getsyi(p[1])[1] r = lib.getsyi(p[1])[1]
if cmp(r, p[2]) not in p[3:]: if cmp(r, p[2]) not in p[3:]:
if fmt: if fmt:
print>>fo, '05102', p[0] print>>fo, '0510�2�', p[0]
else: else:
print>>fo, p[0] print>>fo, p[0]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment