summaryrefslogtreecommitdiff
path: root/modules/pam_group/pam_group.c
diff options
context:
space:
mode:
authorAndrew G. Morgan <morgan@kernel.org>2000-11-26 07:32:39 +0000
committerAndrew G. Morgan <morgan@kernel.org>2000-11-26 07:32:39 +0000
commit6b6fbdbcf1fe84f6b82fe71c178cb6466f76f5e3 (patch)
tree3ec6c86c3afa1b471a98ad9b9f5bae1394c1f26e /modules/pam_group/pam_group.c
parentc5d2c9e20e5c6f42750c42397898ab0f1291544b (diff)
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.
Diffstat (limited to 'modules/pam_group/pam_group.c')
-rw-r--r--modules/pam_group/pam_group.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/pam_group/pam_group.c b/modules/pam_group/pam_group.c
index 2b820df2..af3c7ef3 100644
--- a/modules/pam_group/pam_group.c
+++ b/modules/pam_group/pam_group.c
@@ -165,6 +165,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 '!':
@@ -245,7 +247,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;