summaryrefslogtreecommitdiff
path: root/source4/scripting/python
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mwallnoefer@yahoo.de>2009-11-28 15:28:45 +0100
committerMatthias Dieter Wallnöfer <mwallnoefer@yahoo.de>2009-11-28 15:34:43 +0100
commitecfd1dfcbd8f301b879942322f7fe765f03599bb (patch)
treecff05d52bbb81f5b60ce5476edb37685767f01f6 /source4/scripting/python
parent8a34cf6f51b29f2bb8ff210afb998c3822e65092 (diff)
downloadsamba-ecfd1dfcbd8f301b879942322f7fe765f03599bb.tar.gz
samba-ecfd1dfcbd8f301b879942322f7fe765f03599bb.tar.bz2
samba-ecfd1dfcbd8f301b879942322f7fe765f03599bb.zip
s4:samba3.py/upgrade.py: Revert
This reverts commit 2175c0ed0649d545ea833d50e8d33fbee9051c35. This reverts commit 6c3e2417a0639cd7c367de93615c422cf5217456. This reverts commit dbb8989e05ac3189a5eca11fa40d572388ea02fc. This reverts commit 82adfa39b75aa628c88f828278c6ac09335d1a49. This reverts commit f299efa8f05c6a5b739222bdf75690a4591d3650. After a small discussion with Jelmer we agreed that this isn't the right way to fix the problem. We should wait for a real patch rather to rely on temporal hacks.
Diffstat (limited to 'source4/scripting/python')
-rw-r--r--source4/scripting/python/samba/samba3.py11
-rw-r--r--source4/scripting/python/samba/tests/samba3.py6
-rw-r--r--source4/scripting/python/samba/upgrade.py2
3 files changed, 9 insertions, 10 deletions
diff --git a/source4/scripting/python/samba/samba3.py b/source4/scripting/python/samba/samba3.py
index 809fd012a6..987367990d 100644
--- a/source4/scripting/python/samba/samba3.py
+++ b/source4/scripting/python/samba/samba3.py
@@ -509,7 +509,7 @@ class TdbSam(TdbDatabase):
"""Samba 3 TDB passdb backend reader."""
def _check_version(self):
self.version = fetch_uint32(self.tdb, "INFO/version\0") or 0
- assert self.version in (0, 1, 2, 3)
+ assert self.version in (0, 1, 2)
def usernames(self):
"""Iterate over the usernames in this Tdb database."""
@@ -592,11 +592,10 @@ class TdbSam(TdbDatabase):
for entry in hours:
for i in range(8):
user.hours.append(ord(entry) & (2 ** i) == (2 ** i))
- # FIXME (reactivate also the tests in tests/samba3.py after fixing this)
- #(user.bad_password_count, data) = unpack_uint16(data)
- #(user.logon_count, data) = unpack_uint16(data)
- #(user.unknown_6, data) = unpack_uint32(data)
- #assert len(data) == 0
+ (user.bad_password_count, data) = unpack_uint16(data)
+ (user.logon_count, data) = unpack_uint16(data)
+ (user.unknown_6, data) = unpack_uint32(data)
+ assert len(data) == 0
return user
diff --git a/source4/scripting/python/samba/tests/samba3.py b/source4/scripting/python/samba/tests/samba3.py
index 8128c51fa8..71e08bdd7f 100644
--- a/source4/scripting/python/samba/tests/samba3.py
+++ b/source4/scripting/python/samba/tests/samba3.py
@@ -122,15 +122,15 @@ class TdbSamTestCase(unittest.TestCase):
user.logoff_time = 2147483647
user.acct_desc = ""
user.group_rid = 1001
- # FIXME user.logon_count = 0
- # FIXME user.bad_password_count = 0
+ user.logon_count = 0
+ user.bad_password_count = 0
user.domain = "BEDWYR"
user.munged_dial = ""
user.workstations = ""
user.user_rid = 1000
user.kickoff_time = 2147483647
user.logoff_time = 2147483647
- # FIXME user.unknown_6 = 1260L
+ user.unknown_6 = 1260L
user.logon_divs = 0
user.hours = [True for i in range(168)]
other = self.samdb["root"]
diff --git a/source4/scripting/python/samba/upgrade.py b/source4/scripting/python/samba/upgrade.py
index 3c45245113..205b43cf07 100644
--- a/source4/scripting/python/samba/upgrade.py
+++ b/source4/scripting/python/samba/upgrade.py
@@ -411,7 +411,7 @@ def upgrade_provision(samba3, setup_dir, message, credentials, session_info,
hostname=netbiosname, machinepass=machinepass,
serverrole=serverrole)
- # FIXME: import_wins(Ldb(result.paths.winsdb), samba3.get_wins_db())
+ import_wins(Ldb(result.paths.winsdb), samba3.get_wins_db())
# FIXME: import_registry(registry.Registry(), samba3.get_registry())