Commit 2ad51a0b authored by Alexey Botchkov's avatar Alexey Botchkov

MDEV-17095 pam_user_map module throws syntax error if group name contains backslash.

Let '\\' and '/' symbols to be part of a group name.
parent 104089e1
......@@ -189,13 +189,15 @@ int pam_sm_authenticate(pam_handle_t *pamh, int flags,
s++;
}
from= s;
skip(isalnum(*s) || (*s == '_') || (*s == '.') || (*s == '-') || (*s == '$'));
skip(isalnum(*s) || (*s == '_') || (*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 == '_') || (*s == '.') || (*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