[SCM] Samba Shared Repository - branch master updated

Andrew Bartlett abartlet at samba.org
Wed May 11 00:05:01 UTC 2022


The branch, master has been updated
       via  0b214d666a9 gitignore: Add .ropeproject for pylsp-rope plugin
       via  ede2fcb5fe8 tests/user_check_password_script: Don't try to delete user after failed add
       via  187635ff6ff tests/user_check_password_script: Remove unused imports
       via  e6712751dd9 samdb: Avoid half-created accounts
       via  e6b61869772 tests/samba-tool user: Add test for adding a user over LDAP
       via  9b0f25ec498 tests/samba-tool user_wdigest: Check command results
       via  c87ec2d3315 tests/samba-tool user_wdigest: Add accounts to local database
       via  05a7092fdaf tests/samba-tool user_wdigest: Fix flapping test
       via  a71c62404ab tests/samba-tool user_wdigest: Remove unused imports
       via  7244a64478a bootstrap: matplotlib is not a real Samba dep
       via  c771d197eee bootstrap: chown the whole cloned repo, not just the subfolders
       via  dd568490089 .gitlab-ci: Work around new git restrictions arising from CVE-2022-24765
      from  17ba8120ed6 gpo: Add Centrify Compatible Crontab Extensions

https://git.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 0b214d666a973e9ede9fd70f92b6874cb7fa8ccb
Author: Andreas Schneider <asn at samba.org>
Date:   Tue May 10 08:38:33 2022 +0200

    gitignore: Add .ropeproject for pylsp-rope plugin
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    
    Autobuild-User(master): Andrew Bartlett <abartlet at samba.org>
    Autobuild-Date(master): Wed May 11 00:04:55 UTC 2022 on sn-devel-184

commit ede2fcb5fe855ceb81b8f7f40975334f52c811b5
Author: Joseph Sutton <josephsutton at catalyst.net.nz>
Date:   Tue May 10 16:18:14 2022 +1200

    tests/user_check_password_script: Don't try to delete user after failed add
    
    The user account should not exist if account creation failed.
    
    Signed-off-by: Joseph Sutton <josephsutton at catalyst.net.nz>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>

commit 187635ff6ff1d62a9c5630d3969e65867cb3bb4a
Author: Joseph Sutton <josephsutton at catalyst.net.nz>
Date:   Wed May 11 08:47:40 2022 +1200

    tests/user_check_password_script: Remove unused imports
    
    Signed-off-by: Joseph Sutton <josephsutton at catalyst.net.nz>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>

commit e6712751dd9df5f4a7f2531ee0069d3958cc3b3b
Author: Joseph Sutton <josephsutton at catalyst.net.nz>
Date:   Tue May 10 13:02:30 2022 +1200

    samdb: Avoid half-created accounts
    
    If newuser() or newcomputer() create an account over LDAP, and an
    attempt to modify it (e.g. to change the password) fails, ensure that we
    properly clean up the account. If we are connected over LDAP, we won't
    have transactions to clean things up for us.
    
    Signed-off-by: Joseph Sutton <josephsutton at catalyst.net.nz>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>

commit e6b6186977220530a2a05319a4a121fc582170c9
Author: Joseph Sutton <josephsutton at catalyst.net.nz>
Date:   Tue May 10 13:01:43 2022 +1200

    tests/samba-tool user: Add test for adding a user over LDAP
    
    Ensure that we do not end up with half-created accounts.
    
    Signed-off-by: Joseph Sutton <josephsutton at catalyst.net.nz>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>

commit 9b0f25ec498a318111a5f4fdbba3e1ce82bc0124
Author: Joseph Sutton <josephsutton at catalyst.net.nz>
Date:   Tue May 10 12:59:59 2022 +1200

    tests/samba-tool user_wdigest: Check command results
    
    Ensure that the commands to create and delete the user execute
    successfully.
    
    Signed-off-by: Joseph Sutton <josephsutton at catalyst.net.nz>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>

commit c87ec2d331521569a88bfdbfabd936187963c822
Author: Joseph Sutton <josephsutton at catalyst.net.nz>
Date:   Tue May 10 12:59:06 2022 +1200

    tests/samba-tool user_wdigest: Add accounts to local database
    
    Adding accounts over LDAP means transactions cannot be used, potentially
    leading to problems.
    
    Signed-off-by: Joseph Sutton <josephsutton at catalyst.net.nz>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>

commit 05a7092fdaf31b9264318208eeba3f306712f638
Author: Joseph Sutton <josephsutton at catalyst.net.nz>
Date:   Tue May 10 12:49:50 2022 +1200

    tests/samba-tool user_wdigest: Fix flapping test
    
    The randomly-generated password for the user account may be too weak,
    causing account creation to fail. This leads to further problems, as the
    result of the command is not checked, and connecting over LDAP means
    transactions cannot be used, leading to a half-created account and
    failing tests.
    
    Signed-off-by: Joseph Sutton <josephsutton at catalyst.net.nz>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>

commit a71c62404ab1e669841cc40f98a5f1b51aba2c65
Author: Joseph Sutton <josephsutton at catalyst.net.nz>
Date:   Wed May 11 08:45:24 2022 +1200

    tests/samba-tool user_wdigest: Remove unused imports
    
    Signed-off-by: Joseph Sutton <josephsutton at catalyst.net.nz>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>

commit 7244a64478a6425ee720c752b6cf73a576bbb6c8
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Thu May 5 15:44:05 2022 +1200

    bootstrap: matplotlib is not a real Samba dep
    
    This came in via the original list of packages used
    at Catalyst when building Samba for testing, in particular
    related to an example LDB module to trace LDB requests.
    
    There is no testing need for this even in make test.
    
    Signed-off-by: Andrew Bartlett <abartlet at samba.org>
    Reviewed-by: Andreas Schneider <asn at samba.org>

commit c771d197eeebf2b01d46451cc51b698a99502935
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Fri May 6 13:29:05 2022 +1200

    bootstrap: chown the whole cloned repo, not just the subfolders
    
    Modern git versions have started to notice the possible security issue.
    
    Signed-off-by: Andrew Bartlett <abartlet at samba.org>
    Reviewed-by: Andreas Schneider <asn at samba.org>

commit dd568490089ae6d5bcf03068bfc4ca6b9103badb
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Fri May 6 17:53:29 2022 +1200

    .gitlab-ci: Work around new git restrictions arising from CVE-2022-24765
    
    It was realised that git would run commands found in a git repo
    (eg from configuration).
    
    Signed-off-by: Andrew Bartlett <abartlet at samba.org>
    Reviewed-by: Andreas Schneider <asn at samba.org>

-----------------------------------------------------------------------

Summary of changes:
 .gitignore                                         |  1 +
 .gitlab-ci-main.yml                                |  4 +-
 bootstrap/.gitlab-ci.yml                           |  2 +-
 bootstrap/config.py                                |  1 -
 bootstrap/generated-dists/debian11/bootstrap.sh    |  1 -
 bootstrap/generated-dists/debian11/packages.yml    |  1 -
 bootstrap/generated-dists/ubuntu1804/bootstrap.sh  |  1 -
 bootstrap/generated-dists/ubuntu1804/packages.yml  |  1 -
 bootstrap/generated-dists/ubuntu2004/bootstrap.sh  |  1 -
 bootstrap/generated-dists/ubuntu2004/packages.yml  |  1 -
 bootstrap/sha1sum.txt                              |  2 +-
 python/samba/samdb.py                              | 47 +++++++---
 python/samba/tests/samba_tool/user.py              | 41 ++++++++-
 .../tests/samba_tool/user_check_password_script.py | 10 ---
 python/samba/tests/samba_tool/user_wdigest.py      | 99 ++++++++++------------
 15 files changed, 124 insertions(+), 89 deletions(-)


Changeset truncated at 500 lines:

diff --git a/.gitignore b/.gitignore
index ea59a312e73..de3feaabf28 100644
--- a/.gitignore
+++ b/.gitignore
@@ -87,3 +87,4 @@ python/samba/provision/kerberos_implementation.py
 compile_commands.json
 .clangd/
 .cache/
+.ropeproject/
diff --git a/.gitlab-ci-main.yml b/.gitlab-ci-main.yml
index 3ac0e772576..ee32c57a3a6 100644
--- a/.gitlab-ci-main.yml
+++ b/.gitlab-ci-main.yml
@@ -42,7 +42,7 @@ variables:
   # Set this to the contents of bootstrap/sha1sum.txt
   # which is generated by bootstrap/template.py --render
   #
-  SAMBA_CI_CONTAINER_TAG: 70150480b61ebdec7ec9b4c1214461c88d6de6d6
+  SAMBA_CI_CONTAINER_TAG: 2bfb75bf56b5b40fd57f22b7cfcfdd69d65e4f78
   #
   # We use the ubuntu1804 image as default as
   # it matches what we have on sn-devel-184.
@@ -133,6 +133,8 @@ include:
     - export CXX="ccache c++"
     - ccache -z -M 500M
     - ccache -s
+      # We are already running .gitlab-ci directives from this repo, remove additional checks that break our CI
+    - git config --global --add safe.directory `pwd`
   after_script:
     - mount
     - df -h
diff --git a/bootstrap/.gitlab-ci.yml b/bootstrap/.gitlab-ci.yml
index 0d2ec182576..57979463aa1 100644
--- a/bootstrap/.gitlab-ci.yml
+++ b/bootstrap/.gitlab-ci.yml
@@ -47,7 +47,7 @@ services:
     diff -u bootstrap/sha1sum.txt /tmp/sha1sum-template.txt
     # run smoke test with samba-o3 or samba-fuzz
     docker run --volume $(pwd):${samba_repo_root} --workdir ${samba_repo_root} ${ci_image_name} \
-        /bin/bash -c "sudo chown -R samba:samba ./** && export PKG_CONFIG_PATH=/usr/lib64/compat-gnutls34/pkgconfig:/usr/lib64/compat-nettle32/pkgconfig && script/autobuild.py ${SAMBA_CI_TEST_JOB} --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase"
+        /bin/bash -c "sudo chown -R samba:samba ${samba_repo_root} && export PKG_CONFIG_PATH=/usr/lib64/compat-gnutls34/pkgconfig:/usr/lib64/compat-nettle32/pkgconfig && script/autobuild.py ${SAMBA_CI_TEST_JOB} --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase"
     docker tag ${ci_image_name} ${ci_image_path}:${SAMBA_CI_CONTAINER_TAG}
     docker tag ${ci_image_name} ${ci_image_path}:${timestamp_tag}
     # We build all images, but only upload is it's not marked as broken
diff --git a/bootstrap/config.py b/bootstrap/config.py
index 8bf3cadcc4b..dc1ff100cfd 100644
--- a/bootstrap/config.py
+++ b/bootstrap/config.py
@@ -140,7 +140,6 @@ PKGS = [
     ('python3-iso8601', 'python3-iso8601'),
     ('python3-gpg', 'python3-gpg'),  # defaults to ubuntu/fedora latest
     ('python3-markdown', 'python3-markdown'),
-    ('python3-matplotlib', ''),
     ('python3-dnspython', 'python3-dns'),
     ('python3-pexpect', ''),  # for wintest only
     ('python3-pyasn1', 'python3-pyasn1'), # for krb5 tests
diff --git a/bootstrap/generated-dists/debian11/bootstrap.sh b/bootstrap/generated-dists/debian11/bootstrap.sh
index 07d6209c072..f90cac1c817 100755
--- a/bootstrap/generated-dists/debian11/bootstrap.sh
+++ b/bootstrap/generated-dists/debian11/bootstrap.sh
@@ -91,7 +91,6 @@ apt-get -y install \
     python3-gpg \
     python3-iso8601 \
     python3-markdown \
-    python3-matplotlib \
     python3-pexpect \
     python3-pyasn1 \
     python3-setproctitle \
diff --git a/bootstrap/generated-dists/debian11/packages.yml b/bootstrap/generated-dists/debian11/packages.yml
index 6d3c2385339..c98575758ed 100644
--- a/bootstrap/generated-dists/debian11/packages.yml
+++ b/bootstrap/generated-dists/debian11/packages.yml
@@ -80,7 +80,6 @@ packages:
   - python3-gpg
   - python3-iso8601
   - python3-markdown
-  - python3-matplotlib
   - python3-pexpect
   - python3-pyasn1
   - python3-setproctitle
diff --git a/bootstrap/generated-dists/ubuntu1804/bootstrap.sh b/bootstrap/generated-dists/ubuntu1804/bootstrap.sh
index f35c8fa90ea..da5e2d7e335 100755
--- a/bootstrap/generated-dists/ubuntu1804/bootstrap.sh
+++ b/bootstrap/generated-dists/ubuntu1804/bootstrap.sh
@@ -91,7 +91,6 @@ apt-get -y install \
     python3-gpg \
     python3-iso8601 \
     python3-markdown \
-    python3-matplotlib \
     python3-pexpect \
     python3-pyasn1 \
     python3-setproctitle \
diff --git a/bootstrap/generated-dists/ubuntu1804/packages.yml b/bootstrap/generated-dists/ubuntu1804/packages.yml
index bff014dbb7e..a497af15d59 100644
--- a/bootstrap/generated-dists/ubuntu1804/packages.yml
+++ b/bootstrap/generated-dists/ubuntu1804/packages.yml
@@ -80,7 +80,6 @@ packages:
   - python3-gpg
   - python3-iso8601
   - python3-markdown
-  - python3-matplotlib
   - python3-pexpect
   - python3-pyasn1
   - python3-setproctitle
diff --git a/bootstrap/generated-dists/ubuntu2004/bootstrap.sh b/bootstrap/generated-dists/ubuntu2004/bootstrap.sh
index f35c8fa90ea..da5e2d7e335 100755
--- a/bootstrap/generated-dists/ubuntu2004/bootstrap.sh
+++ b/bootstrap/generated-dists/ubuntu2004/bootstrap.sh
@@ -91,7 +91,6 @@ apt-get -y install \
     python3-gpg \
     python3-iso8601 \
     python3-markdown \
-    python3-matplotlib \
     python3-pexpect \
     python3-pyasn1 \
     python3-setproctitle \
diff --git a/bootstrap/generated-dists/ubuntu2004/packages.yml b/bootstrap/generated-dists/ubuntu2004/packages.yml
index bff014dbb7e..a497af15d59 100644
--- a/bootstrap/generated-dists/ubuntu2004/packages.yml
+++ b/bootstrap/generated-dists/ubuntu2004/packages.yml
@@ -80,7 +80,6 @@ packages:
   - python3-gpg
   - python3-iso8601
   - python3-markdown
-  - python3-matplotlib
   - python3-pexpect
   - python3-pyasn1
   - python3-setproctitle
diff --git a/bootstrap/sha1sum.txt b/bootstrap/sha1sum.txt
index e6b93ec32be..b8f70028a27 100644
--- a/bootstrap/sha1sum.txt
+++ b/bootstrap/sha1sum.txt
@@ -1 +1 @@
-70150480b61ebdec7ec9b4c1214461c88d6de6d6
+2bfb75bf56b5b40fd57f22b7cfcfdd69d65e4f78
diff --git a/python/samba/samdb.py b/python/samba/samdb.py
index fe5e1c407e1..1cba3845fd3 100644
--- a/python/samba/samdb.py
+++ b/python/samba/samdb.py
@@ -55,6 +55,26 @@ class SamDB(samba.Ldb):
     hash_oid_name = {}
     hash_well_known = {}
 
+    class _CleanUpOnError:
+        def __init__(self, samdb, dn):
+            self.samdb = samdb
+            self.dn = dn
+
+        def __enter__(self):
+            pass
+
+        def __exit__(self, exc_type, exc_val, exc_tb):
+            if exc_type is not None:
+                # We failed to modify the account. If we connected to the
+                # database over LDAP, we don't have transactions, and so when
+                # we call transaction_cancel(), the account will still exist in
+                # a half-created state. We'll delete the account to ensure that
+                # doesn't happen.
+                self.samdb.delete(self.dn)
+
+            # Don't suppress any exceptions
+            return False
+
     def __init__(self, url=None, lp=None, modules_dir=None, session_info=None,
                  credentials=None, flags=ldb.FLG_DONT_CREATE_DB,
                  options=None, global_schema=True,
@@ -638,15 +658,17 @@ member: %s
         self.transaction_start()
         try:
             self.add(ldbmessage)
-            if ldbmessage2:
-                self.modify(ldbmessage2)
-
-            # Sets the password for it
-            if setpassword:
-                self.setpassword(("(distinguishedName=%s)" %
-                                  ldb.binary_encode(user_dn)),
-                                 password,
-                                 force_password_change_at_next_login_req)
+
+            with self._CleanUpOnError(self, user_dn):
+                if ldbmessage2:
+                    self.modify(ldbmessage2)
+
+                # Sets the password for it
+                if setpassword:
+                    self.setpassword(("(distinguishedName=%s)" %
+                                      ldb.binary_encode(user_dn)),
+                                     password,
+                                     force_password_change_at_next_login_req)
         except:
             self.transaction_cancel()
             raise
@@ -807,9 +829,10 @@ member: %s
 
             if prepare_oldjoin:
                 password = cn.lower()
-                self.setpassword(("(distinguishedName=%s)" %
-                                  ldb.binary_encode(computer_dn)),
-                                 password, False)
+                with self._CleanUpOnError(self, computer_dn):
+                    self.setpassword(("(distinguishedName=%s)" %
+                                      ldb.binary_encode(computer_dn)),
+                                     password, False)
         except:
             self.transaction_cancel()
             raise
diff --git a/python/samba/tests/samba_tool/user.py b/python/samba/tests/samba_tool/user.py
index 4563bb2d9a3..700cb89c968 100644
--- a/python/samba/tests/samba_tool/user.py
+++ b/python/samba/tests/samba_tool/user.py
@@ -23,7 +23,8 @@ from samba.tests.samba_tool.base import SambaToolCmdTest
 from samba import (
         credentials,
         nttime2unix,
-        dsdb
+        dsdb,
+        werror,
         )
 from samba.ndr import ndr_unpack
 from samba.dcerpc import drsblobs
@@ -127,6 +128,44 @@ class UserCmdTestCase(SambaToolCmdTest):
             self.assertEqual("%s" % found.get("cn"), "%(name)s" % user)
             self.assertEqual("%s" % found.get("name"), "%(name)s" % user)
 
+    def test_newuser_weak_password(self):
+        # Ensure that when we try to create a user over LDAP (thus no
+        # transactions) and the password is too weak, we do not get a
+        # half-created account.
+
+        def cleanup_user(username):
+            try:
+                self.samdb.deleteuser(username)
+            except Exception as err:
+                estr = err.args[0]
+                if 'Unable to find user' not in estr:
+                    raise
+
+        server = os.environ['DC_SERVER']
+        dc_username = os.environ['DC_USERNAME']
+        dc_password = os.environ['DC_PASSWORD']
+
+        username = self.randomName()
+        password = 'a'
+
+        self.addCleanup(cleanup_user, username)
+
+        # Try to add the user and ensure it fails.
+        result, out, err = self.runsubcmd('user', 'add',
+                                          username, password,
+                                          '-H', f'ldap://{server}',
+                                          f'-U{dc_username}%{dc_password}')
+        self.assertCmdFail(result)
+        self.assertIn('Failed to add user', err)
+        self.assertIn('LDAP_CONSTRAINT_VIOLATION', err)
+        self.assertIn(f'{werror.WERR_PASSWORD_RESTRICTION:08X}', err)
+
+        # Now search for the user, and make sure we don't find anything.
+        res = self.samdb.search(self.samdb.domain_dn(),
+                                expression=f'(sAMAccountName={username})',
+                                scope=ldb.SCOPE_SUBTREE)
+        self.assertEqual(0, len(res), 'expected not to find the user')
+
     def _verify_supplementalCredentials(self, ldif,
                                         min_packages=3,
                                         max_packages=6):
diff --git a/python/samba/tests/samba_tool/user_check_password_script.py b/python/samba/tests/samba_tool/user_check_password_script.py
index 06afbade6bd..60a9add1a19 100644
--- a/python/samba/tests/samba_tool/user_check_password_script.py
+++ b/python/samba/tests/samba_tool/user_check_password_script.py
@@ -17,13 +17,7 @@
 #
 
 import os
-import time
-import ldb
 from samba.tests.samba_tool.base import SambaToolCmdTest
-from samba import (
-        nttime2unix,
-        dsdb
-        )
 
 
 class UserCheckPwdTestCase(SambaToolCmdTest):
@@ -48,10 +42,6 @@ class UserCheckPwdTestCase(SambaToolCmdTest):
                                             "-H", "ldap://%s" % os.environ["DC_SERVER"],
                                             "-U%s%%%s" % (os.environ["DC_USERNAME"], os.environ["DC_PASSWORD"]))
         self.assertCmdFail(result, "Should fail adding a user with %s password." % desc)
-        (result, out, err) = self.runsubcmd("user", "delete", user["name"],
-                                            "-H", "ldap://%s" % os.environ["DC_SERVER"],
-                                            "-U%s%%%s" % (os.environ["DC_USERNAME"], os.environ["DC_PASSWORD"]))
-        self.assertCmdSuccess(result, out, err, "Should delete user with %s password." % desc)
 
         (result, out, err) = self.runsubcmd("user", "add", user["name"], good_password,
                                             "-H", "ldap://%s" % os.environ["DC_SERVER"],
diff --git a/python/samba/tests/samba_tool/user_wdigest.py b/python/samba/tests/samba_tool/user_wdigest.py
index 6311341e2e5..874de0d3814 100644
--- a/python/samba/tests/samba_tool/user_wdigest.py
+++ b/python/samba/tests/samba_tool/user_wdigest.py
@@ -18,29 +18,12 @@
 #
 
 import os
-import time
-import base64
-import ldb
 import samba
 from samba.tests.samba_tool.base import SambaToolCmdTest
-from samba import (
-        credentials,
-        nttime2unix,
-        dsdb
-        )
-from samba.ndr import ndr_unpack
-from samba.dcerpc import drsblobs
 from hashlib import md5
-import random
-import string
 
 
 USER_NAME = "WdigestTestUser"
-# Create a random 32 character password, containing only letters and
-# digits to avoid issues when used on the command line.
-USER_PASS = ''.join(random.choice(string.ascii_uppercase +
-                                  string.ascii_lowercase +
-                                  string.digits) for _ in range(32))
 
 # Calculate the MD5 password digest from the supplied user, realm and password
 #
@@ -77,19 +60,23 @@ class UserCmdWdigestTestCase(SambaToolCmdTest):
             expression="ncName=%s" % self.samdb.get_default_basedn(),
             attrs=["nETBIOSName"])
         self.netbios_domain = str(res[0]["nETBIOSName"][0])
-        self.runsubcmd("user",
-                       "create",
-                       USER_NAME,
-                       USER_PASS,
-                       "-H",
-                       "ldap://%s" % os.environ["DC_SERVER"],
-                       "-U%s%%%s" % (
-                            os.environ["DC_USERNAME"],
-                            os.environ["DC_PASSWORD"]))
+        self.password = self.random_password()
+        result, out, err = self.runsubcmd("user",
+                                          "create",
+                                          USER_NAME,
+                                          self.password)
+        self.assertCmdSuccess(result,
+                              out,
+                              err,
+                              "Ensure user is created")
 
     def tearDown(self):
         super(UserCmdWdigestTestCase, self).tearDown()
-        self.runsubcmd("user", "delete", USER_NAME)
+        result, out, err = self.runsubcmd("user", "delete", USER_NAME)
+        self.assertCmdSuccess(result,
+                              out,
+                              err,
+                              "Ensure user is deleted")
 
     def _testWDigest(self, attribute, expected, missing=False):
 
@@ -133,7 +120,7 @@ class UserCmdWdigestTestCase(SambaToolCmdTest):
         attribute = "virtualWDigest01"
         expected = calc_digest(USER_NAME,
                                self.netbios_domain,
-                               USER_PASS)
+                               self.password)
         self._testWDigest(attribute, expected)
 
     # Hash02 MD5(LOWER(sAMAccountName),
@@ -144,7 +131,7 @@ class UserCmdWdigestTestCase(SambaToolCmdTest):
         attribute = "virtualWDigest02"
         expected = calc_digest(USER_NAME.lower(),
                                self.netbios_domain.lower(),
-                               USER_PASS)
+                               self.password)
         self._testWDigest(attribute, expected)
 
     # Hash03 MD5(UPPER(sAMAccountName),
@@ -155,7 +142,7 @@ class UserCmdWdigestTestCase(SambaToolCmdTest):
         attribute = "virtualWDigest03"
         expected = calc_digest(USER_NAME.upper(),
                                self.netbios_domain.upper(),
-                               USER_PASS)
+                               self.password)
         self._testWDigest(attribute, expected)
 
     # Hash04 MD5(sAMAccountName,
@@ -166,7 +153,7 @@ class UserCmdWdigestTestCase(SambaToolCmdTest):
         attribute = "virtualWDigest04"
         expected = calc_digest(USER_NAME,
                                self.netbios_domain.upper(),
-                               USER_PASS)
+                               self.password)
         self._testWDigest(attribute, expected)
 
     # Hash05 MD5(sAMAccountName,
@@ -177,7 +164,7 @@ class UserCmdWdigestTestCase(SambaToolCmdTest):
         attribute = "virtualWDigest05"
         expected = calc_digest(USER_NAME,
                                self.netbios_domain.lower(),
-                               USER_PASS)
+                               self.password)
         self._testWDigest(attribute, expected)
 
     # Hash06 MD5(UPPER(sAMAccountName),
@@ -188,7 +175,7 @@ class UserCmdWdigestTestCase(SambaToolCmdTest):
         attribute = "virtualWDigest06"
         expected = calc_digest(USER_NAME.upper(),
                                self.netbios_domain.lower(),
-                               USER_PASS)
+                               self.password)
         self._testWDigest(attribute, expected)
 
     # Hash07 MD5(LOWER(sAMAccountName),
@@ -199,7 +186,7 @@ class UserCmdWdigestTestCase(SambaToolCmdTest):
         attribute = "virtualWDigest07"
         expected = calc_digest(USER_NAME.lower(),
                                self.netbios_domain.upper(),
-                               USER_PASS)
+                               self.password)
         self._testWDigest(attribute, expected)
 
     # Hash08 MD5(sAMAccountName,
@@ -214,7 +201,7 @@ class UserCmdWdigestTestCase(SambaToolCmdTest):
         attribute = "virtualWDigest08"
         expected = calc_digest(USER_NAME,
                                self.dns_domain,
-                               USER_PASS)
+                               self.password)
         self._testWDigest(attribute, expected)
 
     # Hash09 MD5(LOWER(sAMAccountName),
@@ -225,7 +212,7 @@ class UserCmdWdigestTestCase(SambaToolCmdTest):
         attribute = "virtualWDigest09"
         expected = calc_digest(USER_NAME.lower(),
                                self.dns_domain.lower(),
-                               USER_PASS)
+                               self.password)
         self._testWDigest(attribute, expected)
 
     # Hash10 MD5(UPPER(sAMAccountName),
@@ -236,7 +223,7 @@ class UserCmdWdigestTestCase(SambaToolCmdTest):
         attribute = "virtualWDigest10"
         expected = calc_digest(USER_NAME.upper(),
                                self.dns_domain.upper(),
-                               USER_PASS)
+                               self.password)
         self._testWDigest(attribute, expected)
 
     # Hash11 MD5(sAMAccountName,
@@ -247,7 +234,7 @@ class UserCmdWdigestTestCase(SambaToolCmdTest):
         attribute = "virtualWDigest11"
         expected = calc_digest(USER_NAME,
                                self.dns_domain.upper(),
-                               USER_PASS)
+                               self.password)
         self._testWDigest(attribute, expected)
 
     # Hash12 MD5(sAMAccountName,
@@ -258,7 +245,7 @@ class UserCmdWdigestTestCase(SambaToolCmdTest):
         attribute = "virtualWDigest12"
         expected = calc_digest(USER_NAME,
                                self.dns_domain.lower(),
-                               USER_PASS)
+                               self.password)
         self._testWDigest(attribute, expected)
 
     # Hash13 MD5(UPPER(sAMAccountName),
@@ -269,7 +256,7 @@ class UserCmdWdigestTestCase(SambaToolCmdTest):
         attribute = "virtualWDigest13"
         expected = calc_digest(USER_NAME.upper(),
                                self.dns_domain.lower(),
-                               USER_PASS)
+                               self.password)
         self._testWDigest(attribute, expected)
 
     # Hash14 MD5(LOWER(sAMAccountName),
@@ -281,7 +268,7 @@ class UserCmdWdigestTestCase(SambaToolCmdTest):
         attribute = "virtualWDigest14"
         expected = calc_digest(USER_NAME.lower(),
                                self.dns_domain.upper(),
-                               USER_PASS)
+                               self.password)
         self._testWDigest(attribute, expected)
 
     # Hash15 MD5(userPrincipalName,
@@ -292,7 +279,7 @@ class UserCmdWdigestTestCase(SambaToolCmdTest):
         name = "%s@%s" % (USER_NAME, self.dns_domain)
         expected = calc_digest(name,
                                "",
-                               USER_PASS)
+                               self.password)
         self._testWDigest(attribute, expected)
 
     # Hash16 MD5(LOWER(userPrincipalName),
@@ -303,7 +290,7 @@ class UserCmdWdigestTestCase(SambaToolCmdTest):
         name = "%s@%s" % (USER_NAME.lower(), self.dns_domain.lower())


-- 
Samba Shared Repository



More information about the samba-cvs mailing list