aboutsummaryrefslogtreecommitdiff
path: root/modules/pam_group
diff options
context:
space:
mode:
Diffstat (limited to 'modules/pam_group')
-rw-r--r--modules/pam_group/pam_group.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/modules/pam_group/pam_group.c b/modules/pam_group/pam_group.c
index 6877849e..2525e048 100644
--- a/modules/pam_group/pam_group.c
+++ b/modules/pam_group/pam_group.c
@@ -232,7 +232,7 @@ static int logic_member(const char *string, int *at)
break;
default:
- if (isalpha(c) || c == '*' || isdigit(c) || c == '_'
+ if (isalpha((unsigned char)c) || c == '*' || isdigit((unsigned char)c) || c == '_'
|| c == '-' || c == '.' || c == '/' || c == ':') {
token = 1;
} else if (token) {
@@ -266,7 +266,7 @@ logic_field (const pam_handle_t *pamh, const void *me,
if (next == VAL) {
if (c == '!')
not = !not;
- else if (isalpha(c) || c == '*' || isdigit(c) || c == '_'
+ else if (isalpha((unsigned char)c) || c == '*' || isdigit((unsigned char)c) || c == '_'
|| c == '-' || c == '.' || c == '/' || c == ':') {
right = not ^ agrees(pamh, me, x+at, l, rule);
if (oper == AND)
@@ -394,13 +394,13 @@ check_time (const pam_handle_t *pamh, const void *AT,
not = FALSE;
}
- for (marked_day = 0; len > 0 && isalpha(times[j]); --len) {
+ for (marked_day = 0; len > 0 && isalpha((unsigned char)times[j]); --len) {
int this_day=-1;
D(("%c%c ?", times[j], times[j+1]));
for (i=0; days[i].d != NULL; ++i) {
- if (tolower(times[j]) == days[i].d[0]
- && tolower(times[j+1]) == days[i].d[1] ) {
+ if (tolower((unsigned char)times[j]) == days[i].d[0]
+ && tolower((unsigned char)times[j+1]) == days[i].d[1] ) {
this_day = days[i].bit;
break;
}
@@ -419,7 +419,7 @@ check_time (const pam_handle_t *pamh, const void *AT,
D(("day range = 0%o", marked_day));
time_start = 0;
- for (i=0; len > 0 && i < 4 && isdigit(times[i+j]); ++i, --len) {
+ for (i=0; len > 0 && i < 4 && isdigit((unsigned char)times[i+j]); ++i, --len) {
time_start *= 10;
time_start += times[i+j]-'0'; /* is this portable? */
}
@@ -427,7 +427,7 @@ check_time (const pam_handle_t *pamh, const void *AT,
if (times[j] == '-') {
time_end = 0;
- for (i=1; len > 0 && i < 5 && isdigit(times[i+j]); ++i, --len) {
+ for (i=1; len > 0 && i < 5 && isdigit((unsigned char)times[i+j]); ++i, --len) {
time_end *= 10;
time_end += times[i+j]-'0'; /* is this portable? */
}
@@ -497,7 +497,7 @@ static int find_member(const char *string, int *at)
break;
default:
- if (isalpha(c) || isdigit(c) || c == '_' || c == '*'
+ if (isalpha((unsigned char)c) || isdigit((unsigned char)c) || c == '_' || c == '*'
|| c == '-') {
token = 1;
} else if (token) {