From c306c613399cdd9a2c716b83ce0d47d320aec2a8 Mon Sep 17 00:00:00 2001 From: Alexander Bokovoy Date: Tue, 19 Nov 2024 12:57:46 +0200 Subject: [PATCH] ipaserver/dcerpc: support Samba 4.21 Samba 4.21 moved samba.trust_utils module to samba.lsa_utils. Fixes: https://pagure.io/freeipa/issue/9702 Signed-off-by: Alexander Bokovoy Reviewed-By: Florence Blanc-Renaud --- ipaserver/dcerpc.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ipaserver/dcerpc.py b/ipaserver/dcerpc.py index a28c72361276f12a1a02cd126425ac3c62eddd4f..3344ea226e3cba61912e717f9c375612bb4707e0 100644 --- a/ipaserver/dcerpc.py +++ b/ipaserver/dcerpc.py @@ -55,9 +55,13 @@ from samba import ntstatus import samba try: - from samba.trust_utils import CreateTrustedDomainRelax + from samba.lsa_utils import CreateTrustedDomainRelax except ImportError: - CreateTrustedDomainRelax = None + try: + from samba.trust_utils import CreateTrustedDomainRelax + except ImportError: + CreateTrustedDomainRelax = None + try: from samba import arcfour_encrypt except ImportError: -- 2.47.0