3
# Upon a winbindd authentication, test that an info3 record is cached in
4
# netsamlogon_cache.tdb and cache records are removed from winbindd_cache.tdb
8
from samba import tdb, winbind
11
# We want to implement the following test on a win2k native mode domain.
13
# 1. trash netsamlogon_cache.tdb
14
# 2. wbinfo -r DOMAIN\Administrator [FAIL]
15
# 3. wbinfo --auth-crap DOMAIN\Administrator%password [PASS]
16
# 4. wbinfo -r DOMAIN\Administrator [PASS]
18
# Also for step 3 we want to try 'wbinfo --auth-smbd' and
19
# 'wbinfo --auth-plaintext'
23
# TODO: To implement this test we need to be able to
25
# - pass username%password combination for an invidivual winbindd request
26
# (so we can get the administrator SID so we can clear the info3 cache)
28
# - start/restart winbindd (to trash the winbind cache)
30
# - from samba import dynconfig (to find location of info3 cache)
32
# - be able to modify the winbindd cache (to set/reset individual winbind
35
# - have --auth-crap present in HEAD
38
class WinbindAuthCrap(comfychair.TestCase):
40
raise comfychair.NotRunError, "not implemented"
42
class WinbindAuthSmbd(comfychair.TestCase):
44
# Grr - winbindd in HEAD doesn't contain the auth_smbd function
45
raise comfychair.NotRunError, "no auth_smbd in HEAD"
47
class WinbindAuthPlaintext(comfychair.TestCase):
49
raise comfychair.NotRunError, "not implemented"
51
tests = [WinbindAuthCrap, WinbindAuthSmbd, WinbindAuthPlaintext]
53
if __name__ == "__main__":
54
comfychair.main(tests)