diff options
author | Jakub Hrozek <jhrozek@redhat.com> | 2017-02-23 12:22:49 +0100 |
---|---|---|
committer | Lukas Slebodnik <lslebodn@redhat.com> | 2017-02-28 10:37:09 +0100 |
commit | a4837791f62283079e7be4b17efb769be8b2dfd1 (patch) | |
tree | 3f28653676211c9f3cfbc37c42010736903b608e /src/tests | |
parent | 5a660d3aa67403fba69a8047ecedfe8a4276fc30 (diff) | |
download | sssd-a4837791f62283079e7be4b17efb769be8b2dfd1.tar.gz sssd-a4837791f62283079e7be4b17efb769be8b2dfd1.tar.xz sssd-a4837791f62283079e7be4b17efb769be8b2dfd1.zip |
CONFDB: If no configuration file is provided, create a fallback configuration
This functionality is only enabled in case SSSD is configured with with
--enable-files-domain. If not, the behaviour is as it used to -- SSSD
returns an error, instructing the admin to create a configuration file.
If the option is enabled, a very minimal confdb that only enables the
NSS responder is created. The confdb later adds the implicit files
domain.
Resolves:
https://pagure.io/SSSD/sssd/issue/2229
Reviewed-by: Pavel Březina <pbrezina@redhat.com>
Diffstat (limited to 'src/tests')
-rw-r--r-- | src/tests/intg/test_files_provider.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/tests/intg/test_files_provider.py b/src/tests/intg/test_files_provider.py index abf836bcc..8748ac10b 100644 --- a/src/tests/intg/test_files_provider.py +++ b/src/tests/intg/test_files_provider.py @@ -167,6 +167,12 @@ def disabled_files_domain(request): return None +@pytest.fixture +def no_sssd_conf(request): + create_sssd_fixture(request) + return None + + def setup_pw_with_list(request, user_list): pwd_ops = passwd_ops_setup(request) for user in user_list: @@ -832,3 +838,13 @@ def test_disable_files_domain(add_user_with_canary, disabled_files_domain): # The local user will not be resolvable through nss_sss now res, user = sssd_getpwnam_sync(USER1["name"]) assert res != NssReturnCode.SUCCESS + + +def test_no_sssd_conf(add_user_with_canary, no_sssd_conf): + """ + Test that running without sssd.conf implicitly configures one with + id_provider=files + """ + res, user = sssd_getpwnam_sync(USER1["name"]) + assert res == NssReturnCode.SUCCESS + assert user == USER1 |