[Commits] 2ad51a0: MDEV-17095 pam_user_map module throws syntax error if group name contains backslash.
revision-id: 2ad51a0bd8380fba3d03a4cebd43860329b7fbaa (mariadb-10.1.35-18-g2ad51a0) parent(s): 104089e182f31524d85409bd59f1889e36d4636a committer: Alexey Botchkov timestamp: 2018-08-30 14:51:15 +0400 message: MDEV-17095 pam_user_map module throws syntax error if group name contains backslash. Let '\\' and '/' symbols to be part of a group name. --- plugin/auth_pam/mapper/pam_user_map.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/plugin/auth_pam/mapper/pam_user_map.c b/plugin/auth_pam/mapper/pam_user_map.c index c03ea12..e1d11aca 100644 --- a/plugin/auth_pam/mapper/pam_user_map.c +++ b/plugin/auth_pam/mapper/pam_user_map.c @@ -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;
participants (1)
-
holyfoot@askmonty.org