diff options
author | Sumit Bose <sbose@redhat.com> | 2015-07-14 14:41:34 +0200 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2015-07-17 17:18:35 +0200 |
commit | f9f227bb5a7fe6e5af83debbbd892bdb4e13894d (patch) | |
tree | 98d25f451ec359a0989d98abdc2e8276cad8c37f /src/util | |
parent | aac1c3031aadce0682c4e3873634e405cdd41e69 (diff) | |
download | sssd-f9f227bb5a7fe6e5af83debbbd892bdb4e13894d.tar.gz sssd-f9f227bb5a7fe6e5af83debbbd892bdb4e13894d.tar.xz sssd-f9f227bb5a7fe6e5af83debbbd892bdb4e13894d.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.c | 3 |
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; |