summaryrefslogtreecommitdiffstats
path: root/src/responder
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2014-08-01 06:49:59 +0200
committerJakub Hrozek <jhrozek@redhat.com>2014-08-13 15:10:35 +0200
commit0fcc9ed1c66bed7ef3a0bcd6c517280a82391d2b (patch)
tree22f0cde476bbf4e62697e94f849a5137fda36ccc /src/responder
parentf3a5ac1a50c1fccd0801023658e42d2093e1a33a (diff)
downloadsssd-0fcc9ed1c66bed7ef3a0bcd6c517280a82391d2b.tar.gz
sssd-0fcc9ed1c66bed7ef3a0bcd6c517280a82391d2b.tar.xz
sssd-0fcc9ed1c66bed7ef3a0bcd6c517280a82391d2b.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>
Diffstat (limited to 'src/responder')
-rw-r--r--src/responder/pam/pamsrv_cmd.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/responder/pam/pamsrv_cmd.c b/src/responder/pam/pamsrv_cmd.c
index 140d541ad..d58ef64b7 100644
--- a/src/responder/pam/pamsrv_cmd.c
+++ b/src/responder/pam/pamsrv_cmd.c
@@ -958,6 +958,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