py:dcerpc/raw_testcase: use require DOMAIN/REALM in get_user_creds()
authorStefan Metzmacher <metze@samba.org>
Tue, 20 Nov 2018 16:22:56 +0000 (17:22 +0100)
committerJeremy Allison <jra@samba.org>
Sun, 23 Dec 2018 17:15:21 +0000 (18:15 +0100)
This is the usage now:

SMB_CONF_PATH=/dev/null \
    SERVER=172.31.9.188 \
    TARGET_HOSTNAME=w2012r2-188.w2012r2-l6.base \
    USERNAME=administrator \
    PASSWORD=A1b2C3d4 \
    DOMAIN=W2012R2-L6 \
    REALM=W2012R2-L6.BASE \
    IGNORE_RANDOM_PAD=1 \
    python/samba/tests/dcerpc/raw_protocol.py -v -f TestDCERPC_BIND

BUG: https://bugzilla.samba.org/show_bug.cgi?id=7113
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11892

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
python/samba/tests/dcerpc/raw_testcase.py

index 596eaf5..f38c8d3 100644 (file)
@@ -106,8 +106,12 @@ class RawDCERPCTest(TestCase):
     def get_user_creds(self):
         c = Credentials()
         c.guess()
+        domain = samba.tests.env_get_var_value('DOMAIN')
+        realm = samba.tests.env_get_var_value('REALM')
         username = samba.tests.env_get_var_value('USERNAME')
         password = samba.tests.env_get_var_value('PASSWORD')
+        c.set_domain(domain)
+        c.set_realm(realm)
         c.set_username(username)
         c.set_password(password)
         return c