ipa/0088-ipatests-adapt-error-code-and-message-for-samba-4.22.patch
Florence Blanc-Renaud a96d03c543 ipa-4.12.2-19
- Resolves: RHEL-100450 eDNS: multiple issues during encrypted DNS setup
- Resolves: RHEL-89907 Privilege escalation from host to domain admin in FreeIPA
- Resolves: RHEL-99315 Include latest fixes in python3-ipatests package
- Resolves: RHEL-98565 ipa-idrange-fix: 'Env' object has no attribute 'basedn'
- Resolves: RHEL-96920 Nightly test failure (rawhide) in test_trust.py::TestTrust::test_server_option_with_unreachable_ad
- Resolves: RHEL-31907 kdb: support storing and retrieving multiple master keys

Signed-off-by: Florence Blanc-Renaud <flo@redhat.com>
2025-06-30 11:07:39 +02:00

46 lines
2.0 KiB
Diff

From d03164fc104588e88ad75483e7233b7fccacabb6 Mon Sep 17 00:00:00 2001
From: Florence Blanc-Renaud <flo@redhat.com>
Date: Thu, 6 Mar 2025 15:58:53 +0100
Subject: [PATCH] ipatests: adapt error code and message for samba 4.22
When establishing trust with an unreachable AD domain controller,
the error code and message have changed with samba 4.22.
Update the test to be compatible with any version of samba.
Fixes: https://pagure.io/freeipa/issue/9751
Signed-off-by: Florence Blanc-Renaud <flo@redhat.com>
Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
---
ipatests/test_integration/test_trust.py | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/ipatests/test_integration/test_trust.py b/ipatests/test_integration/test_trust.py
index f71ec377b429b104241e85a3d04ee42c6721494c..4086cb30ac5d52ee595c1ecdbe86a8d511cbb704 100644
--- a/ipatests/test_integration/test_trust.py
+++ b/ipatests/test_integration/test_trust.py
@@ -1072,8 +1072,18 @@ class TestTrust(BaseTestTrust):
paths.VAR_LOG_HTTPD_ERROR,
encoding='utf-8'
)
- assert 'CIFS server communication error: code "3221225653", ' \
- 'message "{Device Timeout}' in httpd_error_log
+
+ # The error code and message changed in samba 4.22
+ old_msg = 'CIFS server communication error: code "3221225653", ' \
+ 'message "{Device Timeout}'
+ new_msg = 'CIFS server communication error: code "3221226021", ' \
+ 'message "The object was not found."'
+ result = self.master.run_command(["smbstatus", "-V"]).stdout_text
+ version = result.split()[1]
+ if tasks.parse_version(version) < tasks.parse_version('4.22.0rc4'):
+ assert old_msg in httpd_error_log
+ else:
+ assert new_msg in httpd_error_log
# Check that trust is successfully established with --server option
tasks.establish_trust_with_ad(
--
2.50.0