summaryrefslogtreecommitdiff
path: root/accel-pptpd/radius/dict.c
diff options
context:
space:
mode:
authorKozlov Dmitry <dima@server>2010-09-13 10:54:48 +0400
committerKozlov Dmitry <dima@server>2010-09-13 10:54:48 +0400
commit5ef0b9025a019aeb8502cd687d17a1e0b7aa0ca4 (patch)
treea2f8f9993772cf5a61c85414abf0dc4e21a4c5a9 /accel-pptpd/radius/dict.c
parent5b13315273d2b97972a0ec9883d70d71620b2978 (diff)
downloadaccel-ppp-5ef0b9025a019aeb8502cd687d17a1e0b7aa0ca4.tar.gz
accel-ppp-5ef0b9025a019aeb8502cd687d17a1e0b7aa0ca4.zip
radius: implemented mschap-v1 authorization
Diffstat (limited to 'accel-pptpd/radius/dict.c')
-rw-r--r--accel-pptpd/radius/dict.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/accel-pptpd/radius/dict.c b/accel-pptpd/radius/dict.c
index 27923518..54f8daa5 100644
--- a/accel-pptpd/radius/dict.c
+++ b/accel-pptpd/radius/dict.c
@@ -270,16 +270,22 @@ void rad_dict_free(struct rad_dict_t *dict)
free(dict);
}
-struct rad_dict_attr_t *rad_dict_find_attr(const char *name)
+static struct rad_dict_attr_t *dict_find_attr(struct list_head *items, const char *name)
{
struct rad_dict_attr_t *attr;
- list_for_each_entry(attr, &dict->items, entry)
+ list_for_each_entry(attr, items, entry)
if (!strcmp(attr->name, name))
return attr;
return NULL;
}
+
+struct rad_dict_attr_t *rad_dict_find_attr(const char *name)
+{
+ return dict_find_attr(&dict->items, name);
+}
+
struct rad_dict_attr_t *rad_dict_find_attr_id(int id)
{
struct rad_dict_attr_t *attr;
@@ -290,6 +296,7 @@ struct rad_dict_attr_t *rad_dict_find_attr_id(int id)
return NULL;
}
+
struct rad_dict_value_t *rad_dict_find_val_name(struct rad_dict_attr_t *attr, const char *name)
{
struct rad_dict_value_t *val;
@@ -326,3 +333,9 @@ struct rad_dict_vendor_t *rad_dict_find_vendor_name(const char *name)
return NULL;
}
+
+struct rad_dict_attr_t *rad_dict_find_vendor_attr(struct rad_dict_vendor_t *vendor, const char *name)
+{
+ return dict_find_attr(&vendor->items, name);
+}
+