test: Test winbind idmap_ad ticket expiry behaviour
authorVolker Lendecke <vl@samba.org>
Thu, 13 Aug 2020 12:59:58 +0000 (14:59 +0200)
committerStefan Metzmacher <metze@samba.org>
Thu, 3 Sep 2020 13:34:11 +0000 (13:34 +0000)
commitc785fc601dee4eea76aa7bc6046812ae99860a74
tree0f3f178fde14c7fffa674300ccf380ec180a4c22
parent725dda2b80987aa3b730d1909419b648b1e3a495
test: Test winbind idmap_ad ticket expiry behaviour

We need to make sure that winbind's idmap_ad deals fine with an
expired krb ticket used to connect to AD via LDAP. In a customer
situation we have seen the RFC4511 section 4.4.1 unsolicited ldap exop
response coming through, but the TCP disconnect that Windows seems to
do after that did not make it. Winbind deals fine with a TCP
disconnect, but right now it does not handle just the section 4.4.1
response properly: It completely hangs.

This test requests a ticket valid for 5 seconds and makes the LDAP
server postpone the TCP disconnect after the ticket expiry for 10
seconds. The tests that winbind reacts to the ticket expiry exop
response by making sure in this situation the wbinfo call running into
the issue takes less than 8 seconds. If it did not look at the expiry
exop response, it would take more than 10 seconds.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=14465
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit a4ecd112e7754ab25bcae749594952a28c4c8905)
nsswitch/tests/test_ticket_expiry.sh [new file with mode: 0755]
selftest/knownfail.d/ticket_expiry [new file with mode: 0644]
selftest/target/Samba3.pm
selftest/target/Samba4.pm
source3/selftest/tests.py