Commit 5a5f18f3 authored by Sergei Golubchik's avatar Sergei Golubchik

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
parent a2330c82
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment