diff options
author | Tim Beale <timbeale@catalyst.net.nz> | 2019-02-26 10:53:43 +1300 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2019-03-04 21:41:16 +0000 |
commit | 4f21f1ca8d566624a11ab14cdc7698f0ddb45985 (patch) | |
tree | 558503bfa4053fb3a6ad2b1dc215b18b777ea496 /source4/selftest | |
parent | 3dab656394447d10d90acb1a19326bf29eec55a3 (diff) | |
download | samba-4f21f1ca8d566624a11ab14cdc7698f0ddb45985.tar.gz |
tests: Remove explicit SOCKET_WRAPPER usage from auth_log tests
The auth-logging tests are an odd combination of server and client
behaviour. On the one hand we want a IRPC connection to see the auth
events being logged on the server. On the other hand, we want the auth
events to appear to be happening on a client. Currently we hardcode in
the use of a SOCKET_WRAPPER interface to make this happen.
We can avoid this explicit socket wrapper usage by using the server
smb.conf instead in the one place we actually want to act like the
server (creating the IRPC connection). Then we can switch from using
the 'ad_dc*:local' testenvs to use 'ad_dc*', in order to act like a
client by default. The SERVERCONFFILE environment variable has already
been added for the few cases where a test needs explicit access to the
server's smb.conf.
However, for samba.tests.auth_log, the samlogon test cases are still
reliant on being run on the :local testenv, and so we can't switch them
over just yet. This is because the samlogon is using the DC's machine
creds underneath, which will fail on the non-local testenv. We could
create separate machine creds for the client and use those, but this is
a non-trivial rework of the test code.
Signed-off-by: Tim Beale <timbeale@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source4/selftest')
-rwxr-xr-x | source4/selftest/tests.py | 25 |
1 files changed, 10 insertions, 15 deletions
diff --git a/source4/selftest/tests.py b/source4/selftest/tests.py index 56aa5baa63a..0cc3441ae68 100755 --- a/source4/selftest/tests.py +++ b/source4/selftest/tests.py @@ -718,12 +718,10 @@ if have_heimdal_support: planoldpythontestsuite("ad_dc_ntvfs:local", "samba.tests.auth_log", extra_args=['-U"$USERNAME%$PASSWORD"'], environ={'CLIENT_IP': '127.0.0.11', 'SOCKET_WRAPPER_DEFAULT_IFACE': 11}) - planoldpythontestsuite("ad_dc:local", "samba.tests.auth_log_pass_change", extra_args=['-U"$USERNAME%$PASSWORD"'], - environ={'CLIENT_IP': '127.0.0.11', - 'SOCKET_WRAPPER_DEFAULT_IFACE': 11}) - planoldpythontestsuite("ad_dc_ntvfs:local", "samba.tests.auth_log_pass_change", extra_args=['-U"$USERNAME%$PASSWORD"'], - environ={'CLIENT_IP': '127.0.0.11', - 'SOCKET_WRAPPER_DEFAULT_IFACE': 11}) + planoldpythontestsuite("ad_dc", "samba.tests.auth_log_pass_change", extra_args=['-U"$USERNAME%$PASSWORD"'], + environ={'CLIENT_IP': '127.0.0.11'}) + planoldpythontestsuite("ad_dc_ntvfs", "samba.tests.auth_log_pass_change", extra_args=['-U"$USERNAME%$PASSWORD"'], + environ={'CLIENT_IP': '127.0.0.11'}) # these tests use a NCA local RPC connection, so always run on the # :local testenv, and so don't need to fake a client connection @@ -739,18 +737,15 @@ if have_heimdal_support: planoldpythontestsuite("ad_member:local", "samba.tests.auth_log_winbind", extra_args=['-U"$DC_USERNAME%$DC_PASSWORD"']) - planoldpythontestsuite("ad_dc:local", "samba.tests.audit_log_pass_change", + planoldpythontestsuite("ad_dc", "samba.tests.audit_log_pass_change", extra_args=['-U"$USERNAME%$PASSWORD"'], - environ={'CLIENT_IP': '127.0.0.11', - 'SOCKET_WRAPPER_DEFAULT_IFACE': 11}) - planoldpythontestsuite("ad_dc:local", "samba.tests.audit_log_dsdb", + environ={'CLIENT_IP': '127.0.0.11'}) + planoldpythontestsuite("ad_dc", "samba.tests.audit_log_dsdb", extra_args=['-U"$USERNAME%$PASSWORD"'], - environ={'CLIENT_IP': '127.0.0.11', - 'SOCKET_WRAPPER_DEFAULT_IFACE': 11}) - planoldpythontestsuite("ad_dc:local", "samba.tests.group_audit", + environ={'CLIENT_IP': '127.0.0.11'}) + planoldpythontestsuite("ad_dc", "samba.tests.group_audit", extra_args=['-U"$USERNAME%$PASSWORD"'], - environ={'CLIENT_IP': '127.0.0.11', - 'SOCKET_WRAPPER_DEFAULT_IFACE': 11}) + environ={'CLIENT_IP': '127.0.0.11'}) planoldpythontestsuite("fl2008r2dc:local", "samba.tests.getdcname", |