]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Move attrs filters into their own directory, rename attrsfile to file
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Fri, 7 Dec 2012 22:02:08 +0000 (22:02 +0000)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Fri, 7 Dec 2012 22:02:08 +0000 (22:02 +0000)
raddb/filter/access_challenge [moved from raddb/attrs.access_challenge with 100% similarity]
raddb/filter/access_reject [moved from raddb/attrs.access_reject with 100% similarity]
raddb/filter/accounting_response [moved from raddb/attrs.accounting_response with 100% similarity]
raddb/filter/post-proxy [moved from raddb/attrs with 100% similarity]
raddb/filter/pre-proxy [moved from raddb/attrs.pre-proxy with 100% similarity]
raddb/mods-available/attr_filter
src/modules/rlm_attr_filter/rlm_attr_filter.c

similarity index 100%
rename from raddb/attrs
rename to raddb/filter/post-proxy
similarity index 100%
rename from raddb/attrs.pre-proxy
rename to raddb/filter/pre-proxy
index b56b34947def8facaa8acac48616b6b5d954005f..0a0861b16c914e1e73df7c3ed89667e94c5d6403 100644 (file)
 # proxied servers, to make sure we send back to our RADIUS client
 # only allowed attributes.
 attr_filter attr_filter.post-proxy {
-       attrsfile = ${confdir}/attrs
+       file = ${confdir}/filter/post-proxy
 }
 
 # attr_filter - filters the attributes in the packets we send to
 # the RADIUS home servers.
 attr_filter attr_filter.pre-proxy {
-       attrsfile = ${confdir}/attrs.pre-proxy
+       file = ${confdir}/filter/pre-proxy
 }
 
 # Enforce RFC requirements on the contents of Access-Reject
@@ -25,7 +25,7 @@ attr_filter attr_filter.pre-proxy {
 #
 attr_filter attr_filter.access_reject {
        key = %{User-Name}
-       attrsfile = ${confdir}/attrs.access_reject
+       file = ${confdir}/filter/access_reject
 }
 
 # Enforce RFC requirements on the contents of Access-Challenge
@@ -34,7 +34,7 @@ attr_filter attr_filter.access_reject {
 #
 attr_filter attr_filter.access_challenge {
        key = %{User-Name}
-       attrsfile = ${confdir}/attrs.access_challenge
+       file = ${confdir}/filter/access_challenge
 }
 
 
@@ -44,5 +44,5 @@ attr_filter attr_filter.access_challenge {
 #
 attr_filter attr_filter.accounting_response {
        key = %{User-Name}
-       attrsfile = ${confdir}/attrs.accounting_response
+       file = ${confdir}/filter/accounting_response
 }
index 46f85efd05967556c5b45fdc6fe59ec7dfccbb4c..c6bfda8df26381493240808fae3a4618451f66f7 100644 (file)
@@ -41,15 +41,15 @@ RCSID("$Id$")
  *     be used as the instance handle.
  */
 struct attr_filter_instance {
-       char *attrsfile;
+       char *file;
        char *key;
        int relaxed;
        PAIR_LIST *attrs;
 };
 
 static const CONF_PARSER module_config[] = {
-       { "attrsfile",     PW_TYPE_FILENAME,
-         offsetof(struct attr_filter_instance,attrsfile), NULL, "${raddbdir}/attrs" },
+       { "file",     PW_TYPE_FILENAME,
+         offsetof(struct attr_filter_instance,file), NULL, "${raddbdir}/attrs" },
        { "key",     PW_TYPE_STRING_PTR,
          offsetof(struct attr_filter_instance,key), NULL, "%{Realm}" },
        { "relaxed",    PW_TYPE_BOOLEAN,
@@ -75,7 +75,7 @@ static void check_pair(VALUE_PAIR *check_item, VALUE_PAIR *reply_item,
 }
 
 
-static int getattrsfile(const char *filename, PAIR_LIST **pair_list)
+static int attr_filter_getfile(const char *filename, PAIR_LIST **pair_list)
 {
        int rcode;
        PAIR_LIST *attrs = NULL;
@@ -154,9 +154,9 @@ static int attr_filter_instantiate(CONF_SECTION *conf, void **instance)
                return -1;
        }
 
-       rcode = getattrsfile(inst->attrsfile, &inst->attrs);
+       rcode = attr_filter_getfile(inst->file, &inst->attrs);
         if (rcode != 0) {
-               radlog(L_ERR|L_CONS, "Errors reading %s", inst->attrsfile);
+               radlog(L_ERR|L_CONS, "Errors reading %s", inst->file);
                attr_filter_detach(inst);
                return -1;
        }