summaryrefslogtreecommitdiffstats
path: root/src/util
diff options
context:
space:
mode:
authorSumit Bose <sbose@redhat.com>2015-07-14 14:41:34 +0200
committerJakub Hrozek <jhrozek@redhat.com>2015-07-16 15:26:29 +0200
commit4f1897ad419790834573643e88ac03e6c5c1c4be (patch)
treec4659332479e0be55ca84a7d6cf016194a7432c7 /src/util
parentf6a71ab5f06642727d5004b9a745a1b8e0393d78 (diff)
downloadsssd-4f1897ad419790834573643e88ac03e6c5c1c4be.tar.gz
sssd-4f1897ad419790834573643e88ac03e6c5c1c4be.tar.xz
sssd-4f1897ad419790834573643e88ac03e6c5c1c4be.zip
nss_check_name_of_well_known_sid() improve name splitting
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 <lslebodn@redhat.com>
Diffstat (limited to 'src/util')
-rw-r--r--src/util/usertools.c3
1 files changed, 1 insertions, 2 deletions
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<name>[^@]+)@?(?P<domain>[^@]*$)");
+ re_pattern = talloc_strdup(tmpctx, IPA_AD_DEFAULT_RE);
if (!re_pattern) {
ret = ENOMEM;
goto done;