From eb5b5d56fbe3f1319ae8be8554d3a51c4900e5da Mon Sep 17 00:00:00 2001 From: sbose Date: Wed, 9 Sep 2009 12:10:53 +0200 Subject: more fixes for older libpcre versions - older version of libpcre only support the Python syntax (?P) for named subpatterns --- server/util/usertools.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'server/util/usertools.c') diff --git a/server/util/usertools.c b/server/util/usertools.c index 21348391..e4e941a6 100644 --- a/server/util/usertools.c +++ b/server/util/usertools.c @@ -64,16 +64,18 @@ int sss_names_init(TALLOC_CTX *mem_ctx, struct confdb_ctx *cdb, struct sss_names if (!ctx->re_pattern) { ctx->re_pattern = talloc_strdup(ctx, - "(?[^@]+)@?(?[^@]*$)"); + "(?P[^@]+)@?(?P[^@]*$)"); if (!ctx->re_pattern) { ret = ENOMEM; goto done; } #ifdef HAVE_LIBPCRE_LESSER_THAN_7 + } else { DEBUG(2, ("This binary was build with a version of libpcre that does " "not support non-unique named subpatterns.\n")); DEBUG(2, ("Please make sure that your pattern [%s] only contains " - "subpatterns with a unique name.\n", ctx->re_pattern)); + "subpatterns with a unique name and uses " + "the Python syntax (?P).\n", ctx->re_pattern)); #endif } -- cgit