test: Test winbind idmap_ad ticket expiry behaviour
authorVolker Lendecke <vl@samba.org>
Thu, 13 Aug 2020 12:59:58 +0000 (14:59 +0200)
committerVolker Lendecke <vl@samba.org>
Fri, 21 Aug 2020 19:14:33 +0000 (19:14 +0000)
commita4ecd112e7754ab25bcae749594952a28c4c8905
tree385bfddf895cedd7a0736dfc630ec753ec5983c1
parent7af2df01dff62d6d9ca572f320ef60dea41d6064
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>
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