URL: https://github.com/SSSD/sssd/pull/5814 Author: aborah-sudo Title: #5814: Tests: sss_override does not take precedence over override_homedir di… Action: synchronized
To pull the PR as Git branch: git remote add ghsssd https://github.com/SSSD/sssd git fetch ghsssd pull/5814/head:pr5814 git checkout pr5814
From a393b748b2d274b6ed36fc7ea48e0c83d61de2f2 Mon Sep 17 00:00:00 2001 From: Anuj Borah <abo...@redhat.com> Date: Wed, 6 Oct 2021 17:59:51 +0530 Subject: [PATCH] Tests: sss_override does not take precedence over override_homedir directive bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1919942 --- .../alltests/test_ldap_extra_attrs.py | 40 +++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/src/tests/multihost/alltests/test_ldap_extra_attrs.py b/src/tests/multihost/alltests/test_ldap_extra_attrs.py index a493fb558b..bfd1fb3120 100644 --- a/src/tests/multihost/alltests/test_ldap_extra_attrs.py +++ b/src/tests/multihost/alltests/test_ldap_extra_attrs.py @@ -193,3 +193,43 @@ def test_0006_bz1667252(self, multihost): cmd = multihost.client[0].run_command(sssctl_cmd) ret = multihost.client[0].service_sssd('status') assert ret == 0 + + @pytest.mark.tier1_2 + def test_0007_bz1919942(self, multihost, + backupsssdconf): + """ + :title: ifp: sss_override does not take + precedence over override_homedir directive + :id: d2e98c70-26a0-11ec-bcf5-845cf3eff344 + :customerscenario: true + :bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1919942 + :steps: + 1. Edit sssd.conf and set homedir, i.e. + `override_homedir = /home/%u1` + 2. Restart sssd and check homedir + 3. Use `sss_override` to set a + different home directory + 4. Restart sssd and use getent command + to check home directory, which is still set to same. + :expectedresults: + 1. Should succeed + 2. Should succeed + 3. Should succeed + 4. Should succeed + """ + tools = sssdTools(multihost.client[0]) + domain_name = tools.get_domain_section_name() + client = sssdTools(multihost.client[0]) + domain_params = {'override_homedir': '/home/%u1'} + client.sssd_conf(f'domain/{domain_name}', domain_params) + multihost.client[0].service_sssd('restart') + before = multihost.client[0].run_command("getent passwd " + "foo5@example1") + assert before.returncode == 0 + multihost.client[0].run_command("sss_override " + "user-add foo5@example1 -h " + "/home/foo56") + multihost.client[0].service_sssd('restart') + after = multihost.client[0].run_command("getent passwd " + "foo5@example1") + assert "User:/home/foo56" in after.stdout_text
_______________________________________________ sssd-devel mailing list -- sssd-devel@lists.fedorahosted.org To unsubscribe send an email to sssd-devel-le...@lists.fedorahosted.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedorahosted.org/archives/list/sssd-devel@lists.fedorahosted.org Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure