mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2026-10-24 14:17:41 -05:00
ipatests: rpcclient now uses --use-kerberos=desired
The integration tests are using rpcclient delivered by samba package. With samba 4.15, the options have been renamed and "--use-kerberos=desired" must be used instead of "-k". (see https://download.samba.org/pub/samba/rc/samba-4.15.0rc4.WHATSNEW.txt) Adapt the test to be compatible with both old and new versions. Fixes: https://pagure.io/freeipa/issue/8979 Signed-off-by: Florence Blanc-Renaud <flo@redhat.com> Reviewed-By: Mohammad Rizwan <myusuf@redhat.com>
This commit is contained in:
1 parent
b91c0afd0b
commit
b18cd122fa
1 file changed
+7
-1
@@ -764,7 +764,13 @@ def remove_trust_info_from_ad(master, ad_domain, ad_hostname):
|
||||
kinit_as_user(master,
|
||||
'Administrator@{}'.format(ad_domain.upper()),
|
||||
master.config.ad_admin_password)
|
||||
master.run_command(['rpcclient', '-k', ad_hostname,
|
||||
# Detect whether rpcclient supports -k or --use-kerberos option
|
||||
res = master.run_command(['rpcclient', '-h'], raiseonerr=False)
|
||||
if "--use-kerberos" in res.stderr_text:
|
||||
rpcclient_krb5_knob = "--use-kerberos=desired"
|
||||
else:
|
||||
rpcclient_krb5_knob = "-k"
|
||||
master.run_command(['rpcclient', rpcclient_krb5_knob, ad_hostname,
|
||||
'-c', 'deletetrustdom {}'.format(master.domain.name)],
|
||||
raiseonerr=False)
|
||||
|
||||
|
||||
Reference in new issue
Block a user