>From 643978c05fe10fa538497d37a8b9e290789c3f59 Mon Sep 17 00:00:00 2001 From: Jakub Hrozek Date: Mon, 16 Sep 2013 13:52:54 +0200 Subject: [PATCH 2/2] LDAP: Deprecate ldap_{user,group}_search_filter --- src/man/sssd-ldap.5.xml | 44 ---------------------------------------- src/providers/ldap/ldap_common.c | 12 +++++++++++ 2 files changed, 12 insertions(+), 44 deletions(-) diff --git a/src/man/sssd-ldap.5.xml b/src/man/sssd-ldap.5.xml index d488ab37a774c45e62555c2cfb5d5be980e7775b..8e6a4a3942bc0ae82f1b356a5b05f948d2f06f5c 100644 --- a/src/man/sssd-ldap.5.xml +++ b/src/man/sssd-ldap.5.xml @@ -2331,50 +2331,6 @@ ldap_access_filter = memberOf=cn=allowedusers,ou=Groups,dc=example,dc=com - - ldap_user_search_filter (string) - - - This option specifies an additional LDAP search - filter criteria that restrict user searches. - - - This option is deprecated in - favor of the syntax used by ldap_user_search_base. - - - Default: not set - - - Example: - - - ldap_user_search_filter = (loginShell=/bin/tcsh) - - - This filter would restrict user searches to users - that have their shell set to /bin/tcsh. - - - - - - ldap_group_search_filter (string) - - - This option specifies an additional LDAP search - filter criteria that restrict group searches. - - - This option is deprecated in - favor of the syntax used by ldap_group_search_base. - - - Default: not set - - - - ldap_sudo_search_base (string) diff --git a/src/providers/ldap/ldap_common.c b/src/providers/ldap/ldap_common.c index b668a48e33ab9791be73d4788e28b27d5822255b..d649e33320f7162226f36eeafac5488e5372c05c 100644 --- a/src/providers/ldap/ldap_common.c +++ b/src/providers/ldap/ldap_common.c @@ -792,6 +792,18 @@ errno_t common_parse_search_base(TALLOC_CTX *mem_ctx, goto done; } + if (old_filter != NULL) { + /* Using a deprecated ldap_{user,group}_search_filter */ + DEBUG(SSSDBG_IMPORTANT_INFO, ("WARNING: Using a deprecated filter " + "option for %s. Please see the documentation on LDAP search " + "bases to see how the obsolete option can be migrated\n", + class_name)); + sss_log(SSS_LOG_NOTICE, "WARNING: Using a deprecated filter option" + "for %s. Please see the documentation on LDAP search bases " + "to see how the obsolete option can be migrated\n", + class_name); + } + ret = sdap_create_search_base(search_bases, unparsed_base, LDAP_SCOPE_SUBTREE, old_filter, &search_bases[0]); -- 1.8.3.1