204 |
return 0; |
return 0; |
205 |
} |
} |
206 |
|
|
207 |
pl = mem_alloc(sizeof(MATCHING_RULE)); |
pl = emalloc(sizeof(MATCHING_RULE)); |
208 |
pl->name = estrdup(name); |
pl->name = estrdup(name); |
209 |
pl->lhs = lhs; |
pl->lhs = lhs; |
210 |
pl->rhs = rhs; |
pl->rhs = rhs; |
1368 |
if (p->rhs) |
if (p->rhs) |
1369 |
avl_free(p->rhs); |
avl_free(p->rhs); |
1370 |
next = p->next; |
next = p->next; |
1371 |
mem_free(p); |
efree(p); |
1372 |
} |
} |
1373 |
*pl = NULL; |
*pl = NULL; |
1374 |
} |
} |
1501 |
int |
int |
1502 |
matches(RADIUS_REQ *req, char *name, MATCHING_RULE *pl, char *matchpart) |
matches(RADIUS_REQ *req, char *name, MATCHING_RULE *pl, char *matchpart) |
1503 |
{ |
{ |
1504 |
if (strncmp(pl->name, "DEFAULT", 7) == 0 || |
memcpy(matchpart, name, AUTH_STRING_LEN); |
1505 |
wild_match(pl->name, name, matchpart) == 0) |
if (strncmp(pl->name, "DEFAULT", 7) == 0 |
1506 |
|
|| wild_match(pl->name, name, matchpart) == 0) |
1507 |
return paircmp(req, pl->lhs, matchpart); |
return paircmp(req, pl->lhs, matchpart); |
1508 |
return 1; |
return 1; |
1509 |
} |
} |