Reverse DICT_ATTR const order
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Tue, 30 Jul 2013 08:26:05 +0000 (09:26 +0100)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Tue, 30 Jul 2013 08:30:47 +0000 (09:30 +0100)
24 files changed:
src/include/libradius.h
src/lib/dict.c
src/lib/radius.c
src/lib/valuepair.c
src/main/client.c
src/main/map.c
src/main/modules.c
src/main/radclient.c
src/main/xlat.c
src/modules/proto_dhcp/dhcp.c
src/modules/rlm_cache/rlm_cache.c
src/modules/rlm_counter/rlm_counter.c
src/modules/rlm_detail/rlm_detail.c
src/modules/rlm_eap/types/rlm_eap_ttls/ttls.c
src/modules/rlm_ldap/ldap.h
src/modules/rlm_otp/otp_pwe.c
src/modules/rlm_passwd/rlm_passwd.c
src/modules/rlm_preprocess/rlm_preprocess.c
src/modules/rlm_rest/rest.c
src/modules/rlm_sometimes/rlm_sometimes.c
src/modules/rlm_sql/rlm_sql.c
src/modules/rlm_sql/rlm_sql.h
src/modules/rlm_sqlcounter/rlm_sqlcounter.c
src/modules/rlm_yubikey/decrypt.c

index cceaba3..8053763 100644 (file)
@@ -226,7 +226,7 @@ typedef enum value_type {
  * They also specify what behaviour should be used when the attribute is merged into a new list/tree.
  */
 typedef struct value_pair {
-       const DICT_ATTR         *da;                            //!< Dictionary attribute defines the attribute
+       DICT_ATTR const         *da;                            //!< Dictionary attribute defines the attribute
                                                                //!< number, vendor and type of the attribute.
 
        struct value_pair       *next;
@@ -364,14 +364,14 @@ int               dict_init(char const *dir, char const *fn);
 void           dict_free(void);
 int            dict_read(char const *dir, char const *filename);
 void           dict_attr_free(DICT_ATTR const **da);
-const DICT_ATTR        *dict_attr_copy(DICT_ATTR const *da, int vp_free);
-const DICT_ATTR        *dict_attrunknown(unsigned int attr, unsigned int vendor, int vp_free);
-const DICT_ATTR        *dict_attrunknownbyname(char const *attribute, int vp_free);
-const DICT_ATTR        *dict_attrbyvalue(unsigned int attr, unsigned int vendor);
-const DICT_ATTR        *dict_attrbyname(char const *attr);
-const DICT_ATTR        *dict_attrbytype(unsigned int attr, unsigned int vendor,
+DICT_ATTR const        *dict_attr_copy(DICT_ATTR const *da, int vp_free);
+DICT_ATTR const        *dict_attrunknown(unsigned int attr, unsigned int vendor, int vp_free);
+DICT_ATTR const        *dict_attrunknownbyname(char const *attribute, int vp_free);
+DICT_ATTR const        *dict_attrbyvalue(unsigned int attr, unsigned int vendor);
+DICT_ATTR const        *dict_attrbyname(char const *attr);
+DICT_ATTR const        *dict_attrbytype(unsigned int attr, unsigned int vendor,
                                 PW_TYPE type);
-const DICT_ATTR        *dict_attrbyparent(DICT_ATTR const *parent, unsigned int attr,
+DICT_ATTR const        *dict_attrbyparent(DICT_ATTR const *parent, unsigned int attr,
                                           unsigned int vendor);
 int            dict_attr_child(DICT_ATTR const *parent,
                                unsigned int *pattr, unsigned int *pvendor);
index c65ca3d..5baafcc 100644 (file)
@@ -213,8 +213,8 @@ static uint32_t dict_attr_name_hash(void const *data)
 
 static int dict_attr_name_cmp(void const *one, void const *two)
 {
-       const DICT_ATTR *a = one;
-       const DICT_ATTR *b = two;
+       DICT_ATTR const *a = one;
+       DICT_ATTR const *b = two;
 
        return strcasecmp(a->name, b->name);
 }
@@ -222,7 +222,7 @@ static int dict_attr_name_cmp(void const *one, void const *two)
 static uint32_t dict_attr_value_hash(void const *data)
 {
        uint32_t hash;
-       const DICT_ATTR *attr = data;
+       DICT_ATTR const *attr = data;
 
        hash = fr_hash(&attr->vendor, sizeof(attr->vendor));
        return fr_hash_update(&attr->attr, sizeof(attr->attr), hash);
@@ -230,8 +230,8 @@ static uint32_t dict_attr_value_hash(void const *data)
 
 static int dict_attr_value_cmp(void const *one, void const *two)
 {
-       const DICT_ATTR *a = one;
-       const DICT_ATTR *b = two;
+       DICT_ATTR const *a = one;
+       DICT_ATTR const *b = two;
 
        if (a->vendor < b->vendor) return -1;
        if (a->vendor > b->vendor) return +1;
@@ -242,7 +242,7 @@ static int dict_attr_value_cmp(void const *one, void const *two)
 static uint32_t dict_attr_combo_hash(void const *data)
 {
        uint32_t hash;
-       const DICT_ATTR *attr = data;
+       DICT_ATTR const *attr = data;
 
        hash = fr_hash(&attr->vendor, sizeof(attr->vendor));
        hash = fr_hash_update(&attr->type, sizeof(attr->type), hash);
@@ -251,8 +251,8 @@ static uint32_t dict_attr_combo_hash(void const *data)
 
 static int dict_attr_combo_cmp(void const *one, void const *two)
 {
-       const DICT_ATTR *a = one;
-       const DICT_ATTR *b = two;
+       DICT_ATTR const *a = one;
+       DICT_ATTR const *b = two;
 
        if (a->type < b->type) return -1;
        if (a->type > b->type) return +1;
@@ -626,7 +626,7 @@ int dict_addattr(char const *name, int attr, unsigned int vendor, int type,
        size_t namelen;
        static int      max_attr = 0;
        const uint8_t   *p;
-       const DICT_ATTR *da;
+       DICT_ATTR const *da;
        DICT_ATTR *n;
 
        namelen = strlen(name);
@@ -965,10 +965,10 @@ int dict_addattr(char const *name, int attr, unsigned int vendor, int type,
 int dict_addvalue(char const *namestr, char const *attrstr, int value)
 {
        size_t          length;
-       const DICT_ATTR *dattr;
+       DICT_ATTR const *dattr;
        DICT_VALUE      *dval;
 
-       static const DICT_ATTR *last_attr = NULL;
+       static DICT_ATTR const *last_attr = NULL;
 
        if (!*namestr) {
                fr_strerror_printf("dict_addvalue: empty names are not permitted");
@@ -1167,7 +1167,7 @@ int dict_str2oid(char const *ptr, unsigned int *pvalue, unsigned int *pvendor,
 {
        char const *p;
        unsigned int value;
-       const DICT_ATTR *da = NULL;
+       DICT_ATTR const *da = NULL;
 
        if (tlv_depth > fr_attr_max_tlv) {
                fr_strerror_printf("Too many sub-attributes");
@@ -1277,7 +1277,7 @@ int dict_str2oid(char const *ptr, unsigned int *pvalue, unsigned int *pvendor,
 /*
  *     Bamboo skewers under the fingernails in 5, 4, 3, 2, ...
  */
-static const DICT_ATTR *dict_parent(unsigned int attr, unsigned int vendor)
+static DICT_ATTR const *dict_parent(unsigned int attr, unsigned int vendor)
 {
        if (vendor < FR_MAX_VENDOR) {
                return dict_attrbyvalue(attr & 0xff, vendor);
@@ -1339,7 +1339,7 @@ static int process_attribute(char const* fn, int const line,
        }
 
        if (oid) {
-               const DICT_ATTR *da;
+               DICT_ATTR const *da;
 
                vendor = block_vendor;
 
@@ -1721,7 +1721,7 @@ static int process_value(char const* fn, int const line, char **argv,
 static int process_value_alias(char const* fn, int const line, char **argv,
                               int argc)
 {
-       const DICT_ATTR *my_da, *da;
+       DICT_ATTR const *my_da, *da;
        DICT_VALUE *dval;
 
        if (argc != 2) {
@@ -1983,7 +1983,7 @@ static int my_dict_init(char const *parent, char const *filename,
        struct stat statbuf;
        char    *argv[MAX_ARGV];
        int     argc;
-       const DICT_ATTR *da, *block_tlv[MAX_TLV_NEST + 1];
+       DICT_ATTR const *da, *block_tlv[MAX_TLV_NEST + 1];
        int     which_block_tlv = 0;
 
        block_tlv[0] = NULL;
@@ -2456,7 +2456,7 @@ int dict_init(char const *dir, char const *fn)
                return -1;
 
        if (value_fixup) {
-               const DICT_ATTR *a;
+               DICT_ATTR const *a;
                value_fixup_t *this, *next;
 
                for (this = value_fixup; this != NULL; this = next) {
@@ -2593,7 +2593,7 @@ void dict_attr_free(DICT_ATTR const **da)
  *     VALUE_PAIR which contains it.
  * @return return a copy of the da.
  */
-const DICT_ATTR *dict_attr_copy(DICT_ATTR const *da, int vp_free)
+DICT_ATTR const *dict_attr_copy(DICT_ATTR const *da, int vp_free)
 {
        DICT_ATTR *copy;
 
@@ -2628,7 +2628,7 @@ const DICT_ATTR *dict_attr_copy(DICT_ATTR const *da, int vp_free)
  * @param[in] vp_free if > 0 DICT_ATTR will be freed on VALUE_PAIR free.
  * @return new dictionary attribute.
  */
-const DICT_ATTR *dict_attrunknown(unsigned int attr, unsigned int vendor,
+DICT_ATTR const *dict_attrunknown(unsigned int attr, unsigned int vendor,
                                  int vp_free)
 {
        DICT_ATTR *da;
@@ -2700,7 +2700,7 @@ const DICT_ATTR *dict_attrunknown(unsigned int attr, unsigned int vendor,
  * @param[in] vp_free if > 0 DICT_ATTR will be freed on VALUE_PAIR free.
  * @return new da or NULL on error.
  */
-const DICT_ATTR *dict_attrunknownbyname(char const *attribute, int vp_free)
+DICT_ATTR const *dict_attrunknownbyname(char const *attribute, int vp_free)
 {
        unsigned int    attr, vendor = 0;
        unsigned int    dv_type = 1;    /* The type of vendor field */
@@ -2709,7 +2709,7 @@ const DICT_ATTR *dict_attrunknownbyname(char const *attribute, int vp_free)
        char            *q;
 
        DICT_VENDOR     *dv;
-       const DICT_ATTR *da;
+       DICT_ATTR const *da;
 
        /*
         *      Pull off vendor prefix first.
@@ -2900,7 +2900,7 @@ const DICT_ATTR *dict_attrunknownbyname(char const *attribute, int vp_free)
 /*
  *     Get an attribute by its numerical value.
  */
-const DICT_ATTR *dict_attrbyvalue(unsigned int attr, unsigned int vendor)
+DICT_ATTR const *dict_attrbyvalue(unsigned int attr, unsigned int vendor)
 {
        DICT_ATTR dattr;
 
@@ -2920,7 +2920,7 @@ const DICT_ATTR *dict_attrbyvalue(unsigned int attr, unsigned int vendor)
  *
  * @return The attribute, or NULL if not found
  */
-const DICT_ATTR *dict_attrbytype(unsigned int attr, unsigned int vendor,
+DICT_ATTR const *dict_attrbytype(unsigned int attr, unsigned int vendor,
                                 PW_TYPE type)
 {
        DICT_ATTR dattr;
@@ -3018,7 +3018,7 @@ find:
 /*
  *     Get an attribute by it's numerical value, and the parent
  */
-const DICT_ATTR *dict_attrbyparent(DICT_ATTR const *parent, unsigned int attr, unsigned int vendor)
+DICT_ATTR const *dict_attrbyparent(DICT_ATTR const *parent, unsigned int attr, unsigned int vendor)
 {
        unsigned int my_attr, my_vendor;
        DICT_ATTR dattr;
@@ -3038,7 +3038,7 @@ const DICT_ATTR *dict_attrbyparent(DICT_ATTR const *parent, unsigned int attr, u
 /*
  *     Get an attribute by its name.
  */
-const DICT_ATTR *dict_attrbyname(char const *name)
+DICT_ATTR const *dict_attrbyname(char const *name)
 {
        DICT_ATTR *da;
        uint32_t buffer[(sizeof(*da) + DICT_ATTR_MAX_NAME_LEN + 3)/4];
index df3e02e..f738890 100644 (file)
@@ -790,7 +790,7 @@ static ssize_t vp2data_tlvs(RADIUS_PACKET const *packet,
 
 #ifndef NDEBUG
        if ((fr_debug_flag > 3) && fr_log_fp) {
-               const DICT_ATTR *da;
+               DICT_ATTR const *da;
 
                da = dict_attrbyvalue(svp->da->attr & ((1 << fr_attr_shift[nest ]) - 1), svp->da->vendor);
                if (da) fprintf(fr_log_fp, "\t%s = ...\n", da->name);
@@ -2924,7 +2924,7 @@ static ssize_t data2vp_tlvs(RADIUS_PACKET *packet,
                            VALUE_PAIR **pvp)
 {
        const uint8_t *data = start;
-       const DICT_ATTR *child;
+       DICT_ATTR const *child;
        VALUE_PAIR *head, **tail;
 
        if (length < 3) return -1; /* type, length, value */
@@ -2992,7 +2992,7 @@ static ssize_t data2vp_vsa(RADIUS_PACKET *packet,
 {
        unsigned int attribute;
        ssize_t attrlen, my_len;
-       const DICT_ATTR *da;
+       DICT_ATTR const *da;
 
 #ifndef NDEBUG
        if (length <= (dv->type + dv->length)) {
@@ -3348,7 +3348,7 @@ static ssize_t data2vp(RADIUS_PACKET *packet,
        size_t datalen;
        ssize_t rcode;
        uint32_t vendor;
-       const DICT_ATTR *child;
+       DICT_ATTR const *child;
        DICT_VENDOR *dv;
        VALUE_PAIR *vp;
        const uint8_t *data = start;
@@ -3819,7 +3819,7 @@ ssize_t rad_attr2vp(RADIUS_PACKET *packet,
 {
        ssize_t rcode;
 
-       const DICT_ATTR *da;
+       DICT_ATTR const *da;
 
        if ((length < 2) || (data[1] < 2) || (data[1] > length)) {
                fr_strerror_printf("rad_attr2vp: Insufficient data");
@@ -3858,7 +3858,7 @@ ssize_t  rad_data2vp(unsigned int attribute, unsigned int vendor,
                     uint8_t const *data, size_t length,
                     VALUE_PAIR **pvp)
 {
-       const DICT_ATTR *da;
+       DICT_ATTR const *da;
 
        if (!data || (length == 0) || !pvp) return -1;
 
index 0b195f9..5f83ee5 100644 (file)
@@ -104,7 +104,7 @@ VALUE_PAIR *pairalloc(TALLOC_CTX *ctx, DICT_ATTR const *da)
  */
 VALUE_PAIR *paircreate(TALLOC_CTX *ctx, unsigned int attr, unsigned int vendor)
 {
-       const DICT_ATTR *da;
+       DICT_ATTR const *da;
 
        da = dict_attrbyvalue(attr, vendor);
        if (!da) {
@@ -177,7 +177,7 @@ void pairfree(VALUE_PAIR **vps)
  */
 int pair2unknown(VALUE_PAIR *vp)
 {
-       const DICT_ATTR *da;
+       DICT_ATTR const *da;
 
        VERIFY_VP(vp);
        if (vp->da->flags.is_unknown) {
@@ -1837,7 +1837,7 @@ bool pairparsevalue(VALUE_PAIR *vp, char const *value)
         */
        case PW_TYPE_COMBO_IP:
                {
-                       const DICT_ATTR *da;
+                       DICT_ATTR const *da;
 
                        if (inet_pton(AF_INET6, value, &vp->vp_ipv6addr) > 0) {
                                da = dict_attrbytype(vp->da->attr, vp->da->vendor,
@@ -1927,7 +1927,7 @@ static VALUE_PAIR *pairmake_any(TALLOC_CTX *ctx,
                                FR_TOKEN op)
 {
        VALUE_PAIR      *vp;
-       const DICT_ATTR *da;
+       DICT_ATTR const *da;
 
        uint8_t         *data;
        size_t          size;
@@ -1994,7 +1994,7 @@ static VALUE_PAIR *pairmake_any(TALLOC_CTX *ctx,
 VALUE_PAIR *pairmake(TALLOC_CTX *ctx, VALUE_PAIR **vps,
                     char const *attribute, char const *value, FR_TOKEN op)
 {
-       const DICT_ATTR *da;
+       DICT_ATTR const *da;
        VALUE_PAIR      *vp;
        char            *tc, *ts;
        int8_t          tag;
index 57f8d35..abf1ca5 100644 (file)
@@ -1153,7 +1153,7 @@ RADCLIENT *client_from_request(RADCLIENT_LIST *clients, REQUEST *request)
        c->src_ipaddr.af = AF_UNSPEC;
 
        for (i = 0; dynamic_config[i].name != NULL; i++) {
-               const DICT_ATTR *da;
+               DICT_ATTR const *da;
                VALUE_PAIR *vp;
 
                da = dict_attrbyname(dynamic_config[i].name);
index 667757e..20138d0 100644 (file)
@@ -68,7 +68,7 @@ int radius_parse_attr(char const *name, value_pair_tmpl_t *vpt,
                      request_refs_t request_def,
                      pair_lists_t list_def)
 {
-       const DICT_ATTR *da;
+       DICT_ATTR const *da;
        char const *p;
        size_t len;
 
@@ -169,7 +169,7 @@ value_pair_tmpl_t *radius_str2tmpl(TALLOC_CTX *ctx, char const *name, FR_TOKEN t
                                vpt->type = VPT_TYPE_LIST;
 
                        } else {
-                               const DICT_ATTR *da;
+                               DICT_ATTR const *da;
                                da = dict_attrbyname(p);
                                if (!da) {
                                        vpt->type = VPT_TYPE_LITERAL;
@@ -384,7 +384,7 @@ value_pair_map_t *radius_cp2map(TALLOC_CTX *ctx, CONF_PAIR *cp,
                cf_log_err(ci, "Can't copy list into an attribute");
                goto error;
        }
-       
+
        /*
         *      Can't copy an xlat expansion or literal into a list,
         *      we don't know what type of attribute we'd need
index 98d0747..27a4247 100644 (file)
@@ -862,7 +862,7 @@ static int load_component_section(CONF_SECTION *cs,
        indexed_modcallable *subcomp;
        char const *modname;
        char const *visiblename;
-       const DICT_ATTR *dattr;
+       DICT_ATTR const *dattr;
 
        /*
         *      Find the attribute used to store VALUEs for this section.
@@ -1064,7 +1064,7 @@ static int load_byserver(CONF_SECTION *cs)
        for (comp = 0; comp < RLM_COMPONENT_COUNT; ++comp) {
                CONF_SECTION *subcs;
                CONF_ITEM *modref;
-               const DICT_ATTR *dattr;
+               DICT_ATTR const *dattr;
 
                subcs = cf_section_sub_find(cs,
                                            section_type_value[comp].section);
@@ -1191,7 +1191,7 @@ static int load_byserver(CONF_SECTION *cs)
        if (!found) do {
                CONF_SECTION *subcs;
 #ifdef WITH_DHCP
-               const DICT_ATTR *dattr;
+               DICT_ATTR const *dattr;
 #endif
 
                subcs = cf_section_sub_find(cs, "vmps");
index 91e1e52..5ccc1ca 100644 (file)
@@ -358,7 +358,7 @@ static int radclient_init(char const *filename)
                        case PW_DIGEST_USER_NAME:
                                /* overlapping! */
                                {
-                                       const DICT_ATTR *da;
+                                       DICT_ATTR const *da;
                                        uint8_t *p;
 
                                        p = talloc_array(vp, uint8_t, vp->length + 2);
index 4def2ac..204d65b 100644 (file)
@@ -59,7 +59,7 @@ struct xlat_exp {
        char const *fmt;        //!< The format string.
        size_t len;             //!< Length of the format string.
 
-       const DICT_ATTR *da;    //!< the name of the dictionary attribute
+       DICT_ATTR const *da;    //!< the name of the dictionary attribute
        int num;                //!< attribute number
        int tag;                //!< attribute tag
        pair_lists_t list;      //!< list of which attribute
index bd17918..7504511 100644 (file)
@@ -605,7 +605,7 @@ ssize_t fr_dhcp_decode_options(RADIUS_PACKET *packet,
         */
        while (next < (data + len)) {
                int num_entries, alen;
-               const DICT_ATTR *da;
+               DICT_ATTR const *da;
 
                p = next;
 
index 6a56b13..25400d7 100644 (file)
@@ -244,7 +244,7 @@ static rlm_cache_entry_t *cache_add(rlm_cache_t *inst, REQUEST *request,
 {
        int ttl;
        VALUE_PAIR *vp, *found, **to_req, **to_cache, **from;
-       const DICT_ATTR *da;
+       DICT_ATTR const *da;
 
        int merge = true;
        REQUEST *context;
@@ -606,7 +606,7 @@ static ssize_t cache_xlat(void *instance, REQUEST *request,
        rlm_cache_t *inst = instance;
        VALUE_PAIR *vp, *vps;
        pair_lists_t list;
-       const DICT_ATTR *target;
+       DICT_ATTR const *target;
        char const *p = fmt;
        int ret = 0;
 
index b2d9eb7..ff946f1 100644 (file)
@@ -355,7 +355,7 @@ static int find_next_reset(rlm_counter_t *inst, time_t timeval)
 static int mod_instantiate(CONF_SECTION *conf, void *instance)
 {
        rlm_counter_t *inst = instance;
-       const DICT_ATTR *dattr;
+       DICT_ATTR const *dattr;
        DICT_VALUE *dval;
        ATTR_FLAGS flags;
        time_t now;
index a8f628a..bca5280 100644 (file)
@@ -100,14 +100,14 @@ static int mod_detach(void *instance)
 
 static uint32_t detail_hash(void const *data)
 {
-       const DICT_ATTR *da = data;
+       DICT_ATTR const *da = data;
        return fr_hash(&da, sizeof(da));
 }
 
 static int detail_cmp(void const *a, void const *b)
 {
-       const DICT_ATTR *one = a;
-       const DICT_ATTR *two = b;
+       DICT_ATTR const *one = a;
+       DICT_ATTR const *two = b;
 
        return one - two;
 }
@@ -134,7 +134,7 @@ static int mod_instantiate(CONF_SECTION *conf, void *instance)
                     ci != NULL;
                     ci = cf_item_find_next(cs, ci)) {
                        char const      *attr;
-                       const DICT_ATTR *da;
+                       DICT_ATTR const *da;
 
                        if (!cf_item_is_pair(ci)) continue;
 
index 0128623..6467e2e 100644 (file)
@@ -274,7 +274,7 @@ static VALUE_PAIR *diameter2vp(REQUEST *request, REQUEST *fake, SSL *ssl,
                case PW_TYPE_INTEGER:
                case PW_TYPE_DATE:
                        if (size != vp->length) {
-                               const DICT_ATTR *da;
+                               DICT_ATTR const *da;
 
                                /*
                                 *      Bad format.  Create a "raw"
index bea54c0..a67e5ba 100644 (file)
@@ -110,7 +110,7 @@ typedef struct ldap_instance {
                                                        //!< resolution necessary to determine the DNs of those groups,
                                                        //!< then right them to the control list (LDAP-GroupDN).
 
-       const DICT_ATTR *group_da;                      //!< The DA associated with this specific version of the
+       DICT_ATTR const *group_da;                      //!< The DA associated with this specific version of the
                                                        //!< rlm_ldap module.
 
        /*
index d74b02b..c39dee3 100644 (file)
@@ -45,14 +45,14 @@ USES_APPLE_DEPRECATED_API
 
 /* Attribute IDs for supported password encodings. */
 #define SIZEOF_PWATTR (4 * 2)
-const DICT_ATTR *pwattr[SIZEOF_PWATTR];
+DICT_ATTR const *pwattr[SIZEOF_PWATTR];
 
 
 /* Initialize the pwattr array for supported password encodings. */
 void
 otp_pwe_init(void)
 {
-       const DICT_ATTR *da;
+       DICT_ATTR const *da;
 
        /*
         * Setup known password types.  These are pairs.
index 0bf6f6a..14aee30 100644 (file)
@@ -381,7 +381,7 @@ struct passwd_instance {
        int                     nfields;
        int                     keyfield;
        int                     listable;
-       const DICT_ATTR         *keyattr;
+       DICT_ATTR const         *keyattr;
        int                     ignore_empty;
 };
 
@@ -423,7 +423,7 @@ static int mod_instantiate(CONF_SECTION *conf, void *instance)
        char *lf=NULL; /* destination list flags temporary */
        size_t len;
        int i;
-       const DICT_ATTR * da;
+       DICT_ATTR const * da;
        struct passwd_instance *inst = instance;
 
        rad_assert(inst->filename && *inst->filename);
index 61fc60e..3aaee17 100644 (file)
@@ -181,7 +181,7 @@ static void alvarion_vsa_hack(VALUE_PAIR *vp)
        for (vp = paircursor(&cursor, &vp);
             vp;
             vp = pairnext(&cursor)) {
-               const DICT_ATTR *da;
+               DICT_ATTR const *da;
 
                if (vp->da->vendor != 12394) {
                        continue;
index fb3a197..f82c1b4 100644 (file)
@@ -953,10 +953,10 @@ static int rest_decode_post(rlm_rest_t *instance,
 
        char *expanded = NULL;
 
-       const DICT_ATTR *da;
+       DICT_ATTR const *da;
        VALUE_PAIR *vp;
 
-       const DICT_ATTR **current, *processed[REST_BODY_MAX_ATTRS + 1];
+       DICT_ATTR const **current, *processed[REST_BODY_MAX_ATTRS + 1];
 
        pair_lists_t list_name;
        request_refs_t request_name;
@@ -1252,7 +1252,7 @@ static VALUE_PAIR *json_pairmake(rlm_rest_t *instance,
        struct lh_entry *entry;
        json_flags_t flags;
 
-       const DICT_ATTR *da;
+       DICT_ATTR const *da;
        VALUE_PAIR *vp = NULL;
 
        request_refs_t request_name;
index 578b9b0..3348d34 100644 (file)
@@ -36,7 +36,7 @@ typedef struct rlm_sometimes_t {
        int                     start;
        int                     end;
        char                    *key;
-       const DICT_ATTR         *da;
+       DICT_ATTR const         *da;
 } rlm_sometimes_t;
 
 /*
index 59dc6ab..10f1444 100644 (file)
@@ -733,7 +733,7 @@ static int mod_instantiate(CONF_SECTION *conf, void *instance)
                inst->config->xlat_name = cf_section_name1(conf);
        } else {
                char *group_name;
-               const DICT_ATTR *dattr;
+               DICT_ATTR const *dattr;
                ATTR_FLAGS flags;
 
                /*
index 0343e50..2fa110f 100644 (file)
@@ -119,7 +119,7 @@ struct sql_inst {
        rlm_sql_config_t        *config;
        CONF_SECTION            *cs;
 
-       const DICT_ATTR         *sql_user;      //!< Cached pointer to SQL-User-Name
+       DICT_ATTR const         *sql_user;      //!< Cached pointer to SQL-User-Name
                                                //!< dictionary attribute.
 
        void *handle;
index 83b57f5..a40ee88 100644 (file)
@@ -69,9 +69,9 @@ typedef struct rlm_sqlcounter_t {
                                        //!< never or user defined.
        time_t          reset_time;
        time_t          last_reset;
-       const DICT_ATTR *key_attr;      //!< Attribute number for key field.
-       const DICT_ATTR *dict_attr;     //!< Attribute number for the counter.
-       const DICT_ATTR *reply_attr;    //!< Attribute number for the reply.
+       DICT_ATTR const *key_attr;      //!< Attribute number for key field.
+       DICT_ATTR const *dict_attr;     //!< Attribute number for the counter.
+       DICT_ATTR const *reply_attr;    //!< Attribute number for the reply.
 } rlm_sqlcounter_t;
 
 /*
@@ -395,7 +395,7 @@ static int sqlcounter_cmp(void *instance, REQUEST *request, UNUSED VALUE_PAIR *r
 static int mod_instantiate(CONF_SECTION *conf, void *instance)
 {
        rlm_sqlcounter_t *inst = instance;
-       const DICT_ATTR *dattr;
+       DICT_ATTR const *dattr;
        ATTR_FLAGS flags;
        time_t now;
 
@@ -489,7 +489,7 @@ static rlm_rcode_t mod_authorize(UNUSED void *instance, UNUSED REQUEST *request)
        rlm_sqlcounter_t *inst = instance;
        int rcode = RLM_MODULE_NOOP;
        unsigned int counter;
-       const DICT_ATTR *dattr;
+       DICT_ATTR const *dattr;
        VALUE_PAIR *key_vp, *check_vp;
        VALUE_PAIR *reply_item;
        char msg[128];
index 8d91306..e6c4106 100644 (file)
@@ -21,7 +21,7 @@ rlm_rcode_t rlm_yubikey_decrypt(rlm_yubikey_t *inst, REQUEST *request, VALUE_PAI
        uint32_t counter;
        yubikey_token_st token;
 
-       const DICT_ATTR *da;
+       DICT_ATTR const *da;
 
        char private_id[(YUBIKEY_UID_SIZE * 2) + 1];
        VALUE_PAIR *key, *vp;