Skip to content

Commit

Permalink
MDEV-17095 pam_user_map module throws syntax error if group name cont…
Browse files Browse the repository at this point in the history
…ains backslash.

Let '\\' and '/' symbols to be part of a group name.
  • Loading branch information
Alexey Botchkov committed Aug 30, 2018
1 parent 104089e commit 2ad51a0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions plugin/auth_pam/mapper/pam_user_map.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 2ad51a0

Please sign in to comment.