diff options
author | Jakub Hrozek <jhrozek@redhat.com> | 2014-08-01 06:49:59 +0200 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2014-08-14 16:04:24 +0200 |
commit | db4d659f52009e24d082f1f8b8a9fe526ce0dac6 (patch) | |
tree | a79eff3786b65df12148e1b379afe26973a2008f /src | |
parent | 0cf7a46067e6cd48d1084e7ec695c2fa46cc3233 (diff) | |
download | sssd-db4d659f52009e24d082f1f8b8a9fe526ce0dac6.tar.gz sssd-db4d659f52009e24d082f1f8b8a9fe526ce0dac6.tar.xz sssd-db4d659f52009e24d082f1f8b8a9fe526ce0dac6.zip |
PAM: Use the override_space option
https://fedorahosted.org/sssd/ticket/2397
When using the override_default_space option, this patch allows to log
in using both the original name (space user) as well as the normalized
name (space_user).
Reviewed-by: Pavel Březina <pbrezina@redhat.com>
Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com>
(cherry picked from commit 0fcc9ed1c66bed7ef3a0bcd6c517280a82391d2b)
Diffstat (limited to 'src')
-rw-r--r-- | src/responder/pam/pamsrv_cmd.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/responder/pam/pamsrv_cmd.c b/src/responder/pam/pamsrv_cmd.c index b0ba6222a..9562ab78b 100644 --- a/src/responder/pam/pamsrv_cmd.c +++ b/src/responder/pam/pamsrv_cmd.c @@ -947,6 +947,14 @@ static int pam_check_user_search(struct pam_auth_req *preq) return ENOMEM; } + name = sss_reverse_replace_space(preq, name, + pctx->rctx->override_space); + if (name == NULL) { + DEBUG(SSSDBG_CRIT_FAILURE, + "sss_reverse_replace_space failed\n"); + return ENOMEM; + } + /* Refresh the user's cache entry on any PAM query * We put a timeout in the client context so that we limit * the number of updates within a reasonable timeout |