From 4f1897ad419790834573643e88ac03e6c5c1c4be Mon Sep 17 00:00:00 2001 From: Sumit Bose Date: Tue, 14 Jul 2015 14:41:34 +0200 Subject: nss_check_name_of_well_known_sid() improve name splitting MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Currently in the default configuration nss_check_name_of_well_known_sid() can only split fully-qualified names in the user@domain.name style. DOM\user style names will cause an error and terminate the whole request. With this patch both styles can be handled by default, additionally if the name could not be split nss_check_name_of_well_known_sid() returns ENOENT which can be handled more gracefully by the caller. Resolves https://fedorahosted.org/sssd/ticket/2717 Reviewed-by: Lukáš Slebodník --- src/util/usertools.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/util') diff --git a/src/util/usertools.c b/src/util/usertools.c index c43d420e3..87a8d7411 100644 --- a/src/util/usertools.c +++ b/src/util/usertools.c @@ -249,8 +249,7 @@ int sss_names_init(TALLOC_CTX *mem_ctx, struct confdb_ctx *cdb, } if (!re_pattern) { - re_pattern = talloc_strdup(tmpctx, - "(?P[^@]+)@?(?P[^@]*$)"); + re_pattern = talloc_strdup(tmpctx, IPA_AD_DEFAULT_RE); if (!re_pattern) { ret = ENOMEM; goto done; -- cgit