[SSSD] [PATCH] Handle compiling FQDN regular expression with old pcre gracefully

Jakub Hrozek jhrozek at redhat.com
Tue Nov 20 22:27:56 UTC 2012


Two users have asked for the option to run the 1.9 series on RHEL5
recently. 

I haven't tested further than a simple log in as an IPA user with this
patch on F-17 and RHEL5. I don't think we should be spending much more
time on RHEL5 frankly.

https://fedorahosted.org/sssd/ticket/1661
-------------- next part --------------
>From 47b00c6b64c6b004368f23e9af149a4f89ae66ea Mon Sep 17 00:00:00 2001
From: Jakub Hrozek <jhrozek at redhat.com>
Date: Tue, 20 Nov 2012 15:48:48 -0500
Subject: [PATCH] Handle compiling FQDN regular expression with old pcre
 gracefully

https://fedorahosted.org/sssd/ticket/1661
---
 src/util/usertools.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/src/util/usertools.c b/src/util/usertools.c
index b8715fe23268bdfd58888ea6ec399c2b823e3889..0a657a1826f06b457fcd62c439b3877183801661 100644
--- a/src/util/usertools.c
+++ b/src/util/usertools.c
@@ -84,6 +84,14 @@ static errno_t get_id_provider_default_re(TALLOC_CTX *mem_ctx,
                                           const char *conf_path,
                                           char **re_pattern)
 {
+#ifdef HAVE_LIBPCRE_LESSER_THAN_7
+    DEBUG(SSSDBG_MINOR_FAILURE,
+          ("The libpcre version on this system is too old. Only "
+           "the user at DOMAIN name fully qualified name format will "
+           "be supported\n"));
+    *re_pattern = NULL;
+    return EOK;
+#else
     int ret;
     size_t c;
     char *id_provider = NULL;
@@ -124,6 +132,7 @@ static errno_t get_id_provider_default_re(TALLOC_CTX *mem_ctx,
 done:
     talloc_free(id_provider);
     return ret;
+#endif
 }
 
 int sss_names_init(TALLOC_CTX *mem_ctx, struct confdb_ctx *cdb,
-- 
1.8.0



More information about the sssd-devel mailing list