diff --git a/src/tests/multihost/alltests/test_config_merging.py b/src/tests/multihost/alltests/test_config_merging.py index fb1aeb792dd..247f8c3cb7b 100644 --- a/src/tests/multihost/alltests/test_config_merging.py +++ b/src/tests/multihost/alltests/test_config_merging.py @@ -33,6 +33,7 @@ def test_0001_verifypermission(self, multihost): content = "[%s]\nuse_fully_quailified_name = False" % section snippet_file = "/etc/sssd/conf.d/01_snippet.conf" multihost.client[0].put_file_contents(snippet_file, content) + multihost.client[0].run_command(f"chmod o-rwx {snippet_file}") returncode = multihost.client[0].service_sssd('start') if returncode == 0: config_check = 'sssctl config-check' @@ -63,6 +64,7 @@ def test_0002_hiddenfiles(self, multihost): file_content = "[%s]\nuse_fully_quailified_name = False" % dom_section snippet_file = "/etc/sssd/conf.d/._01_snippet.conf" multihost.client[0].put_file_contents(snippet_file, file_content) + multihost.client[0].run_command(f"chmod o-rwx {snippet_file}") start = multihost.client[0].service_sssd('start') sssctl_cmd = 'sssctl config-check' if start == 0: @@ -87,6 +89,7 @@ def test_0003_lastreadparameter(self, multihost): multihost.client[0].put_file_contents(snippet_file, content) chmod = 'chmod 600 %s' % snippet_file multihost.client[0].run_command(chmod) + multihost.client[0].run_command(f"chmod o-rwx {snippet_file}") start = multihost.client[0].service_sssd('start') cmd = multihost.client[0].run_command(['sssctl', 'config-check']) if cmd.returncode == 0 and start == 0: @@ -115,6 +118,7 @@ def test_0004_formatsnippetfile(self, multihost): multihost.client[0].put_file_contents(snippet_file, file_content) cmd_chmod = 'chmod 600 %s' % snippet_file multihost.client[0].run_command(cmd_chmod, raiseonerr=False) + multihost.client[0].run_command(f"chmod o-rwx {snippet_file}") start = multihost.client[0].service_sssd('start') if start == 0: config_check = 'sssctl config-check' @@ -192,7 +196,7 @@ def test_0006_bz1372258(self, multihost): sssctl_check = multihost.client[0].run_command(sssctl_cmd, raiseonerr=False) result = sssctl_check.stdout_text.strip() - assert '/etc/sssd/conf.d/False_snippet.conf' in result + assert 'Configuration validation failed:' in result or "did not pass access check" in result for idx in ['True', 'False']: snippet_file = "/etc/sssd/conf.d/%s_snippet.conf" % idx cmd = "rm -f %s" % snippet_file