diff options
author | Sergei Golubchik <serg@mariadb.org> | 2016-01-21 21:58:30 +0100 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2016-01-25 17:04:14 +0100 |
commit | 5a5f18f3f7f5c98800c6370836bc407deb0e5c02 (patch) | |
tree | 2de5d79f2d5ecb4983f5203ab50c08b67665cd06 /plugin | |
parent | a2330c820af56d69e19f07f9cc9deb655fc67174 (diff) | |
download | mariadb-git-5a5f18f3f7f5c98800c6370836bc407deb0e5c02.tar.gz |
MDEV-9205 PAM user map plugin does not work with LDAP groups
allow more characters in a valid user/group name:
* POSIX allows dashes '-' and dots '.'
* also the name may end with a dollar sign '$'
for our purposes it's enough to allow [-.$] anywhere in the name
Diffstat (limited to 'plugin')
-rw-r--r-- | plugin/auth_pam/mapper/pam_user_map.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/plugin/auth_pam/mapper/pam_user_map.c b/plugin/auth_pam/mapper/pam_user_map.c index 1c4bccc7f27..fb149c5cc05 100644 --- a/plugin/auth_pam/mapper/pam_user_map.c +++ b/plugin/auth_pam/mapper/pam_user_map.c @@ -127,13 +127,13 @@ int pam_sm_authenticate(pam_handle_t *pamh, int flags, s++; } from= s; - skip(isalnum(*s) || (*s == '_')); + skip(isalnum(*s) || (*s == '_') || (*s == '.') || (*s == '-') || (*s == '$')); end_from= s; skip(isspace(*s)); if (end_from == from || *s++ != ':') goto syntax_error; skip(isspace(*s)); to= s; - skip(isalnum(*s) || (*s == '_')); + skip(isalnum(*s) || (*s == '_') || (*s == '.') || (*s == '-') || (*s == '$')); end_to= s; if (end_to == to) goto syntax_error; |