~vcs-imports/samba/main

« back to all changes in this revision

Viewing changes to source/stf/info3cache.py

  • Committer: jerry
  • Date: 2006-07-14 21:48:39 UTC
  • Revision ID: vcs-imports@canonical.com-20060714214839-586d8c489a8fcead
gutting trunk to move to svn:externals

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/usr/bin/python
2
 
#
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
5
 
#
6
 
 
7
 
import comfychair, stf
8
 
from samba import tdb, winbind
9
 
 
10
 
#
11
 
# We want to implement the following test on a win2k native mode domain.
12
 
#
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]
17
 
#
18
 
# Also for step 3 we want to try 'wbinfo --auth-smbd' and
19
 
# 'wbinfo --auth-plaintext'
20
 
#
21
 
 
22
 
#
23
 
# TODO: To implement this test we need to be able to
24
 
#
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)
27
 
#
28
 
#  - start/restart winbindd (to trash the winbind cache)
29
 
#
30
 
#  - from samba import dynconfig (to find location of info3 cache)
31
 
#
32
 
#  - be able to modify the winbindd cache (to set/reset individual winbind
33
 
#    cache entries)
34
 
#
35
 
#  - have --auth-crap present in HEAD
36
 
#
37
 
 
38
 
class WinbindAuthCrap(comfychair.TestCase):
39
 
    def runtest(self):
40
 
        raise comfychair.NotRunError, "not implemented"
41
 
        
42
 
class WinbindAuthSmbd(comfychair.TestCase):
43
 
    def runtest(self):
44
 
        # Grr - winbindd in HEAD doesn't contain the auth_smbd function
45
 
        raise comfychair.NotRunError, "no auth_smbd in HEAD"
46
 
 
47
 
class WinbindAuthPlaintext(comfychair.TestCase):
48
 
    def runtest(self):
49
 
        raise comfychair.NotRunError, "not implemented"
50
 
 
51
 
tests = [WinbindAuthCrap, WinbindAuthSmbd, WinbindAuthPlaintext]
52
 
 
53
 
if __name__ == "__main__":
54
 
    comfychair.main(tests)