View | Details | Raw Unified | Return to bug 1315 | Differences between
and this patch

Collapse All | Expand All

(-)groupaccess.c (-5 / +17 lines)
Lines 78-90 Link Here
78
int
78
int
79
ga_match(char * const *groups, int n)
79
ga_match(char * const *groups, int n)
80
{
80
{
81
	int i, j;
81
	int i, j, pattern_return, got_positive;
82
82
83
	got_positive = 0;
83
	for (i = 0; i < ngroups; i++)
84
	for (i = 0; i < ngroups; i++)
84
		for (j = 0; j < n; j++)
85
		for (j = 0; j < n; j++) {
85
			if (match_pattern(groups_byname[i], groups[j]))
86
			 pattern_return = (match_pattern_list(groups_byname[i], groups[j], strlen(groups[j]), 0));
86
				return 1;
87
			 switch (pattern_return) {
87
	return 0;
88
			 case -1:
89
			 	return 0;
90
			 case 0:
91
			 	continue;
92
			 case 1:
93
			 	got_positive = 1;
94
			 default:
95
			 	/* shouldn't get here */
96
			 	continue;
97
			 }
98
		}
99
	return got_positive;
88
}
100
}
89
101
90
/*
102
/*

Return to bug 1315