mirror of
https://github.com/MariaDB/server.git
synced 2026-10-23 18:49:29 +03:00
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
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user