From 6b6fbdbcf1fe84f6b82fe71c178cb6466f76f5e3 Mon Sep 17 00:00:00 2001 From: "Andrew G. Morgan" Date: Sun, 26 Nov 2000 07:32:39 +0000 Subject: Relevant BUGIDs: 116076 Purpose of commit: bugfix Commit summary: --------------- Added pam_time/pam_group fixes for infinite loop when reading '\\[^\n]' in their config files and also added support for '/'. The latter makes both of these modules support modern tty handling. --- modules/pam_time/pam_time.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'modules/pam_time') diff --git a/modules/pam_time/pam_time.c b/modules/pam_time/pam_time.c index b3ce0df9..0964f776 100644 --- a/modules/pam_time/pam_time.c +++ b/modules/pam_time/pam_time.c @@ -166,6 +166,8 @@ static int read_field(int fd, char **buf, int *from, int *to) if ((*buf)[i+1] == '\n') { shift_bytes(i + *buf, 2, *to - (i+2)); *to -= 2; + } else { + ++i; /* we don't escape non-newline characters */ } break; case '!': @@ -247,7 +249,7 @@ static int logic_member(const char *string, int *at) default: if (isalpha(c) || c == '*' || isdigit(c) || c == '_' - || c == '-' || c == '.') { + || c == '-' || c == '.' || c == '/') { token = 1; } else if (token) { --to; -- cgit v1.2.3