From fe8e05a9ea8185325ff87ac73ef0106a85cd662a Mon Sep 17 00:00:00 2001 From: Joe Guo Date: Mon, 30 Jul 2018 18:15:34 +1200 Subject: [PATCH 12/17] CVE-2018-16857 PEP8: fix E127: continuation line over-indented for visual indent Signed-off-by: Joe Guo Reviewed-by: Andrew Bartlett Reviewed-by: Douglas Bagnall Partial backport of commit bbb9f57603d (only password_lockout_base.py change) as a dependency for: BUG: https://bugzilla.samba.org/show_bug.cgi?id=13683 --- .../tests/python/password_lockout_base.py | 36 +++++++++---------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/source4/dsdb/tests/python/password_lockout_base.py b/source4/dsdb/tests/python/password_lockout_base.py index 9d82e088bb8..1b408c75166 100644 --- a/source4/dsdb/tests/python/password_lockout_base.py +++ b/source4/dsdb/tests/python/password_lockout_base.py @@ -390,7 +390,7 @@ lockoutThreshold: """ + str(lockoutThreshold) + """ lastLogon=("greater", 0), lastLogonTimestamp=("greater", 0), userAccountControl= - dsdb.UF_NORMAL_ACCOUNT, + dsdb.UF_NORMAL_ACCOUNT, msDSUserAccountControlComputed=0) badPasswordTime = int(res[0]["badPasswordTime"][0]) logonCount = int(res[0]["logonCount"][0]) @@ -421,7 +421,7 @@ lockoutThreshold: """ + str(lockoutThreshold) + """ lastLogon=lastLogon, lastLogonTimestamp=lastLogonTimestamp, userAccountControl= - dsdb.UF_NORMAL_ACCOUNT, + dsdb.UF_NORMAL_ACCOUNT, msDSUserAccountControlComputed=0, msg='lastlogontimestamp with wrong password') badPasswordTime = int(res[0]["badPasswordTime"][0]) @@ -440,7 +440,7 @@ lockoutThreshold: """ + str(lockoutThreshold) + """ lastLogon=('greater', lastLogon), lastLogonTimestamp=lastLogonTimestamp, userAccountControl= - dsdb.UF_NORMAL_ACCOUNT, + dsdb.UF_NORMAL_ACCOUNT, msDSUserAccountControlComputed=0, msg='LLTimestamp is updated to lastlogon') @@ -461,7 +461,7 @@ lockoutThreshold: """ + str(lockoutThreshold) + """ lastLogon=lastLogon, lastLogonTimestamp=lastLogonTimestamp, userAccountControl= - dsdb.UF_NORMAL_ACCOUNT, + dsdb.UF_NORMAL_ACCOUNT, msDSUserAccountControlComputed=0) badPasswordTime = int(res[0]["badPasswordTime"][0]) @@ -483,7 +483,7 @@ lockoutThreshold: """ + str(lockoutThreshold) + """ lastLogon=lastLogon, lastLogonTimestamp=lastLogonTimestamp, userAccountControl= - dsdb.UF_NORMAL_ACCOUNT, + dsdb.UF_NORMAL_ACCOUNT, msDSUserAccountControlComputed=0) badPasswordTime = int(res[0]["badPasswordTime"][0]) @@ -508,7 +508,7 @@ lockoutThreshold: """ + str(lockoutThreshold) + """ lastLogonTimestamp=lastLogonTimestamp, lockoutTime=("greater", badPasswordTime), userAccountControl= - dsdb.UF_NORMAL_ACCOUNT, + dsdb.UF_NORMAL_ACCOUNT, msDSUserAccountControlComputed=dsdb.UF_LOCKOUT) badPasswordTime = int(res[0]["badPasswordTime"][0]) lockoutTime = int(res[0]["lockoutTime"][0]) @@ -530,7 +530,7 @@ lockoutThreshold: """ + str(lockoutThreshold) + """ lastLogonTimestamp=lastLogonTimestamp, lockoutTime=lockoutTime, userAccountControl= - dsdb.UF_NORMAL_ACCOUNT, + dsdb.UF_NORMAL_ACCOUNT, msDSUserAccountControlComputed=dsdb.UF_LOCKOUT) # The wrong password @@ -550,7 +550,7 @@ lockoutThreshold: """ + str(lockoutThreshold) + """ lastLogonTimestamp=lastLogonTimestamp, lockoutTime=lockoutTime, userAccountControl= - dsdb.UF_NORMAL_ACCOUNT, + dsdb.UF_NORMAL_ACCOUNT, msDSUserAccountControlComputed=dsdb.UF_LOCKOUT) # The correct password, but we are locked out @@ -570,7 +570,7 @@ lockoutThreshold: """ + str(lockoutThreshold) + """ lastLogonTimestamp=lastLogonTimestamp, lockoutTime=lockoutTime, userAccountControl= - dsdb.UF_NORMAL_ACCOUNT, + dsdb.UF_NORMAL_ACCOUNT, msDSUserAccountControlComputed=dsdb.UF_LOCKOUT) # wait for the lockout to end @@ -585,7 +585,7 @@ lockoutThreshold: """ + str(lockoutThreshold) + """ lastLogon=lastLogon, lastLogonTimestamp=lastLogonTimestamp, userAccountControl= - dsdb.UF_NORMAL_ACCOUNT, + dsdb.UF_NORMAL_ACCOUNT, msDSUserAccountControlComputed=0) # The correct password after letting the timeout expire @@ -605,7 +605,7 @@ lockoutThreshold: """ + str(lockoutThreshold) + """ lastLogonTimestamp=lastLogonTimestamp, lockoutTime=0, userAccountControl= - dsdb.UF_NORMAL_ACCOUNT, + dsdb.UF_NORMAL_ACCOUNT, msDSUserAccountControlComputed=0, msg="lastLogon is way off") @@ -629,7 +629,7 @@ lockoutThreshold: """ + str(lockoutThreshold) + """ lastLogon=lastLogon, lastLogonTimestamp=lastLogonTimestamp, userAccountControl= - dsdb.UF_NORMAL_ACCOUNT, + dsdb.UF_NORMAL_ACCOUNT, msDSUserAccountControlComputed=0) badPasswordTime = int(res[0]["badPasswordTime"][0]) @@ -650,7 +650,7 @@ lockoutThreshold: """ + str(lockoutThreshold) + """ lastLogon=lastLogon, lastLogonTimestamp=lastLogonTimestamp, userAccountControl= - dsdb.UF_NORMAL_ACCOUNT, + dsdb.UF_NORMAL_ACCOUNT, msDSUserAccountControlComputed=0) badPasswordTime = int(res[0]["badPasswordTime"][0]) @@ -664,7 +664,7 @@ lockoutThreshold: """ + str(lockoutThreshold) + """ lastLogon=lastLogon, lastLogonTimestamp=lastLogonTimestamp, userAccountControl= - dsdb.UF_NORMAL_ACCOUNT, + dsdb.UF_NORMAL_ACCOUNT, msDSUserAccountControlComputed=0) # The wrong password @@ -684,7 +684,7 @@ lockoutThreshold: """ + str(lockoutThreshold) + """ lastLogon=lastLogon, lastLogonTimestamp=lastLogonTimestamp, userAccountControl= - dsdb.UF_NORMAL_ACCOUNT, + dsdb.UF_NORMAL_ACCOUNT, msDSUserAccountControlComputed=0) badPasswordTime = int(res[0]["badPasswordTime"][0]) @@ -700,7 +700,7 @@ lockoutThreshold: """ + str(lockoutThreshold) + """ lastLogon=("greater", lastLogon), lastLogonTimestamp=lastLogonTimestamp, userAccountControl= - dsdb.UF_NORMAL_ACCOUNT, + dsdb.UF_NORMAL_ACCOUNT, msDSUserAccountControlComputed=0) def _test_multiple_logon(self, creds): @@ -734,7 +734,7 @@ lockoutThreshold: """ + str(lockoutThreshold) + """ lastLogon=("greater", 0), lastLogonTimestamp=("greater", 0), userAccountControl= - dsdb.UF_NORMAL_ACCOUNT, + dsdb.UF_NORMAL_ACCOUNT, msDSUserAccountControlComputed=0) badPasswordTime = int(res[0]["badPasswordTime"][0]) logonCount = int(res[0]["logonCount"][0]) @@ -774,5 +774,5 @@ lockoutThreshold: """ + str(lockoutThreshold) + """ lastLogon=(lastlogon_relation, lastLogon), lastLogonTimestamp=lastLogonTimestamp, userAccountControl= - dsdb.UF_NORMAL_ACCOUNT, + dsdb.UF_NORMAL_ACCOUNT, msDSUserAccountControlComputed=0) -- 2.17.1