From 34d211eba8f6be629e4110dae5b8cb880aec0962 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= Date: Tue, 25 Apr 2017 07:18:23 +0200 Subject: [PATCH 1/2] Revert "service: Add nss and pam sssd.conf services after joining" This reverts commit 402cbab6e8267fcd959bcfa84a47f4871b59944d. --- service/realm-sssd-ad.c | 3 --- service/realm-sssd-config.c | 2 ++ service/realm-sssd-ipa.c | 3 --- tests/test-sssd-config.c | 4 ++-- 4 files changed, 4 insertions(+), 8 deletions(-) diff --git a/service/realm-sssd-ad.c b/service/realm-sssd-ad.c index 5fa81ce..5ed384d 100644 --- a/service/realm-sssd-ad.c +++ b/service/realm-sssd-ad.c @@ -160,7 +160,6 @@ configure_sssd_for_domain (RealmIniConfig *config, gboolean use_adcli, GError **error) { - const gchar *services[] = { "nss", "pam", NULL }; GString *realmd_tags; const gchar *access_provider; const gchar *shell; @@ -207,8 +206,6 @@ configure_sssd_for_domain (RealmIniConfig *config, "ldap_sasl_authid", authid, NULL); - realm_ini_config_set_list_diff (config, "sssd", "services", ", ", services, NULL); - g_free (authid); g_string_free (realmd_tags, TRUE); diff --git a/service/realm-sssd-config.c b/service/realm-sssd-config.c index d4398b9..2096afd 100644 --- a/service/realm-sssd-config.c +++ b/service/realm-sssd-config.c @@ -154,6 +154,8 @@ realm_sssd_config_add_domain (RealmIniConfig *config, g_strfreev (already); /* Setup a default sssd section */ + if (!realm_ini_config_have (config, "section", "services")) + realm_ini_config_set (config, "sssd", "services", "nss, pam", NULL); if (!realm_ini_config_have (config, "sssd", "config_file_version")) realm_ini_config_set (config, "sssd", "config_file_version", "2", NULL); diff --git a/service/realm-sssd-ipa.c b/service/realm-sssd-ipa.c index 001870d..b12136e 100644 --- a/service/realm-sssd-ipa.c +++ b/service/realm-sssd-ipa.c @@ -156,7 +156,6 @@ on_ipa_client_do_restart (GObject *source, GAsyncResult *result, gpointer user_data) { - const gchar *services[] = { "nss", "pam", NULL }; GTask *task = G_TASK (user_data); EnrollClosure *enroll = g_task_get_task_data (task); RealmSssd *sssd = g_task_get_source_object (task); @@ -208,8 +207,6 @@ on_ipa_client_do_restart (GObject *source, "realmd_tags", realmd_tags, NULL); - realm_ini_config_set_list_diff (config, "sssd", "services", ", ", services, NULL); - g_free (home); } diff --git a/tests/test-sssd-config.c b/tests/test-sssd-config.c index 892b9d5..59eab75 100644 --- a/tests/test-sssd-config.c +++ b/tests/test-sssd-config.c @@ -90,7 +90,7 @@ test_add_domain (Test *test, gconstpointer unused) { const gchar *data = "[domain/one]\nval=1\n[sssd]\ndomains=one"; - const gchar *check = "[domain/one]\nval=1\n[sssd]\ndomains = one, two\nconfig_file_version = 2\n\n[domain/two]\ndos = 2\n"; + const gchar *check = "[domain/one]\nval=1\n[sssd]\ndomains = one, two\nconfig_file_version = 2\nservices = nss, pam\n\n[domain/two]\ndos = 2\n"; GError *error = NULL; gchar *output; gboolean ret; @@ -140,7 +140,7 @@ static void test_add_domain_only (Test *test, gconstpointer unused) { - const gchar *check = "\n[sssd]\ndomains = two\nconfig_file_version = 2\n\n[domain/two]\ndos = 2\n"; + const gchar *check = "\n[sssd]\ndomains = two\nconfig_file_version = 2\nservices = nss, pam\n\n[domain/two]\ndos = 2\n"; GError *error = NULL; gchar *output; gboolean ret; -- 2.9.3