mirror of
https://github.com/samba-team/samba.git
synced 2024-12-24 21:34:56 +03:00
s4:dsdb/tests: let password_lockout.py pass creds as argument to _readd_user()
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
parent
f301623550
commit
860c6b1e8f
@ -277,8 +277,7 @@ userAccountControl: %d
|
|||||||
time.sleep(0.01)
|
time.sleep(0.01)
|
||||||
return res
|
return res
|
||||||
|
|
||||||
def _readd_user(self):
|
def _readd_user(self, creds):
|
||||||
creds = insta_creds()
|
|
||||||
username = creds.get_username()
|
username = creds.get_username()
|
||||||
userpass = creds.get_password()
|
userpass = creds.get_password()
|
||||||
userdn = "cn=%s,cn=users,%s" % (username, self.base_dn)
|
userdn = "cn=%s,cn=users,%s" % (username, self.base_dn)
|
||||||
@ -500,7 +499,8 @@ lockoutThreshold: """ + str(lockoutThreshold) + """
|
|||||||
self.samr_handle = self.samr.Connect2(None, security.SEC_FLAG_MAXIMUM_ALLOWED)
|
self.samr_handle = self.samr.Connect2(None, security.SEC_FLAG_MAXIMUM_ALLOWED)
|
||||||
self.samr_domain = self.samr.OpenDomain(self.samr_handle, security.SEC_FLAG_MAXIMUM_ALLOWED, self.domain_sid)
|
self.samr_domain = self.samr.OpenDomain(self.samr_handle, security.SEC_FLAG_MAXIMUM_ALLOWED, self.domain_sid)
|
||||||
|
|
||||||
self.ldb2 = self._readd_user()
|
self.creds2 = insta_creds()
|
||||||
|
self.ldb2 = self._readd_user(self.creds2)
|
||||||
|
|
||||||
# (Re)adds the test user "testuser3" with no password atm
|
# (Re)adds the test user "testuser3" with no password atm
|
||||||
delete_force(self.ldb, "cn=testuser3,cn=users," + self.base_dn)
|
delete_force(self.ldb, "cn=testuser3,cn=users," + self.base_dn)
|
||||||
|
Loading…
Reference in New Issue
Block a user