From 649ebdd271593d15ded63bc8ae49caddd480f59d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= Date: Tue, 25 Apr 2017 07:20:17 +0200 Subject: [PATCH 2/2] service: Add "pam" and "nss" services uing realm_ini_config_set_list_diff() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit By using realm_ini_config_set_list_diff() we can ensure the services will be handled well in all possible cases. https://bugs.freedesktop.org/show_bug.cgi?id=98479 Signed-off-by: Fabiano FidĂȘncio --- service/realm-sssd-config.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/service/realm-sssd-config.c b/service/realm-sssd-config.c index 2096afd..140d7dc 100644 --- a/service/realm-sssd-config.c +++ b/service/realm-sssd-config.c @@ -130,6 +130,7 @@ realm_sssd_config_add_domain (RealmIniConfig *config, gchar **already; gboolean ret; gchar *section; + const gchar *services[] = { "nss", "pam", NULL }; va_list va; gint i; @@ -154,8 +155,7 @@ 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); + realm_ini_config_set_list_diff (config, "sssd", "services", ", ", services, NULL); if (!realm_ini_config_have (config, "sssd", "config_file_version")) realm_ini_config_set (config, "sssd", "config_file_version", "2", NULL); -- 2.9.3