]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
remove escape function from xlat handlers; perform escaping *once* in decode_attribute
authorPhil Mayers <p.mayers@imperial.ac.uk>
Fri, 5 Oct 2012 11:52:12 +0000 (12:52 +0100)
committerPhil Mayers <p.mayers@imperial.ac.uk>
Fri, 5 Oct 2012 11:52:12 +0000 (12:52 +0100)
14 files changed:
src/include/radiusd.h
src/main/listen.c
src/main/mainconfig.c
src/main/realms.c
src/main/xlat.c
src/modules/rlm_cache/rlm_cache.c
src/modules/rlm_exec/rlm_exec.c
src/modules/rlm_expr/rlm_expr.c
src/modules/rlm_ldap/rlm_ldap.c
src/modules/rlm_mschap/rlm_mschap.c
src/modules/rlm_perl/rlm_perl.c
src/modules/rlm_redis/rlm_redis.c
src/modules/rlm_soh/rlm_soh.c
src/modules/rlm_sql/rlm_sql.c

index f6e256b11242644ceaa388fa7b686b2b082773c6..feeff4871308a5a0e7fd1e19bb854a11836cf51c 100644 (file)
@@ -716,7 +716,7 @@ typedef size_t (*RADIUS_ESCAPE_STRING)(char *out, size_t outlen, const char *in)
 
 int            radius_xlat(char * out, int outlen, const char *fmt,
                           REQUEST * request, RADIUS_ESCAPE_STRING func, void *funcarg);
-typedef size_t (*RAD_XLAT_FUNC)(void *instance, REQUEST *, const char *, char *, size_t, RADIUS_ESCAPE_STRING func);
+typedef size_t (*RAD_XLAT_FUNC)(void *instance, REQUEST *, const char *, char *, size_t);
 int            xlat_register(const char *module, RAD_XLAT_FUNC func,
                              void *instance);
 void           xlat_unregister(const char *module, RAD_XLAT_FUNC func,
index 11bca647396a557b99aa8c28f940b19b8a523a45..2624f424636a06fb1a98e29314e598250e180faf 100644 (file)
@@ -94,8 +94,7 @@ static int command_write_magic(int newfd, listen_socket_t *sock);
  */
 static size_t xlat_listen(UNUSED void *instance, REQUEST *request,
                       const char *fmt, char *out,
-                      size_t outlen,
-                      UNUSED RADIUS_ESCAPE_STRING func)
+                      size_t outlen)
 {
        const char *value = NULL;
        CONF_PAIR *cp;
index 50c1898207d4638924dc255999c7e48a1efa304b..5e51e3656a00116f712f4fe448ddc8f0a4a70bac 100644 (file)
@@ -353,8 +353,7 @@ static size_t config_escape_func(char *out, size_t outlen, const char *in)
  */
 static size_t xlat_config(void *instance, REQUEST *request,
                          const char *fmt, char *out,
-                         size_t outlen,
-                         RADIUS_ESCAPE_STRING func)
+                         size_t outlen)
 {
        const char *value;
        CONF_PAIR *cp;
@@ -392,7 +391,9 @@ static size_t xlat_config(void *instance, REQUEST *request,
                }
        }
 
-       return func(out, outlen, value);
+       strlcpy(out, value, outlen);
+
+       return strlen(out);
 }
 
 
@@ -401,8 +402,7 @@ static size_t xlat_config(void *instance, REQUEST *request,
  */
 static size_t xlat_client(UNUSED void *instance, REQUEST *request,
                       const char *fmt, char *out,
-                      size_t outlen,
-                      UNUSED RADIUS_ESCAPE_STRING func)
+                      size_t outlen)
 {
        const char *value = NULL;
        CONF_PAIR *cp;
index c2a1af6e652f183771391f3bc9aa8a4ea91abcfe..ff74aa6d133fce0fdc0d12982cf829054d81f3de 100644 (file)
@@ -230,8 +230,7 @@ static size_t xlat_cs(CONF_SECTION *cs, const char *fmt, char *out, size_t outle
  *     Xlat for %{home_server:foo}
  */
 static size_t xlat_home_server(UNUSED void *instance, REQUEST *request,
-                              const char *fmt, char *out, size_t outlen,
-                              UNUSED RADIUS_ESCAPE_STRING func)
+                              const char *fmt, char *out, size_t outlen)
 {
        if (!fmt || !out || (outlen < 1)) return 0;
 
@@ -248,8 +247,7 @@ static size_t xlat_home_server(UNUSED void *instance, REQUEST *request,
  *     Xlat for %{home_server_pool:foo}
  */
 static size_t xlat_server_pool(UNUSED void *instance, REQUEST *request,
-                              const char *fmt, char *out, size_t outlen,
-                              UNUSED RADIUS_ESCAPE_STRING func)
+                              const char *fmt, char *out, size_t outlen)
 {
        if (!fmt || !out || (outlen < 1)) return 0;
 
index 24328d2095c148416dec86e9f4fab4fe2e63b5a8..4d8974deb7e32ccde724e799cc60f20ae19ea878 100644 (file)
@@ -74,14 +74,11 @@ static int xlat_inst[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8 };     /* up to 8 for regex */
 /**
  * @brief Convert the value on a VALUE_PAIR to string
  */
-static int valuepair2str(char * out,int outlen,VALUE_PAIR * pair,
-                        int type, RADIUS_ESCAPE_STRING func)
+static int valuepair2str(char * out,int outlen,VALUE_PAIR * pair, int type)
 {
-       char buffer[MAX_STRING_LEN * 4];
-
        if (pair != NULL) {
-               vp_prints_value(buffer, sizeof(buffer), pair, -1);
-               return func(out, outlen, buffer);
+               vp_prints_value(out, outlen, pair, -1);
+               return strlen(out);
        }
 
        switch (type) {
@@ -130,8 +127,7 @@ redo:
  *     Dynamically translate for check:, request:, reply:, etc.
  */
 static size_t xlat_packet(void *instance, REQUEST *request,
-                         const char *fmt, char *out, size_t outlen,
-                         RADIUS_ESCAPE_STRING func)
+                         const char *fmt, char *out, size_t outlen)
 {
        DICT_ATTR       *da;
        VALUE_PAIR      *vp;
@@ -297,7 +293,7 @@ static size_t xlat_packet(void *instance, REQUEST *request,
                        for (vp = pairfind_tag(vps, da, tag);
                             vp != NULL;
                             vp = pairfind_tag(vp->next, da, tag)) {
-                               count = valuepair2str(out, outlen - 1, vp, da->type, func);
+                               count = valuepair2str(out, outlen - 1, vp, da->type);
                                rad_assert(count <= outlen);
                                total += count + 1;
                                outlen -= (count + 1);
@@ -345,7 +341,7 @@ static size_t xlat_packet(void *instance, REQUEST *request,
                        return snprintf(out, outlen, "%u", vp->vp_integer);
                }
 
-               return valuepair2str(out, outlen, vp, da->type, func);
+               return valuepair2str(out, outlen, vp, da->type);
        }
 
        vp = pairfind(vps, da->attr, da->vendor);
@@ -472,8 +468,7 @@ static size_t xlat_packet(void *instance, REQUEST *request,
                        }
 
                        localvp.type = da->type;
-                       return valuepair2str(out, outlen, &localvp,
-                                            da->type, func);
+                       return valuepair2str(out, outlen, &localvp, da->type);
                }
 
                /*
@@ -487,15 +482,14 @@ static size_t xlat_packet(void *instance, REQUEST *request,
        /*
         *      Convert the VP to a string, and return it.
         */
-       return valuepair2str(out, outlen, vp, da->type, func);
+       return valuepair2str(out, outlen, vp, da->type);
 }
 
 /**
  * @brief Print data as integer, not as VALUE.
  */
 static size_t xlat_integer(UNUSED void *instance, REQUEST *request,
-                          const char *fmt, char *out, size_t outlen,
-                          UNUSED RADIUS_ESCAPE_STRING func)
+                          const char *fmt, char *out, size_t outlen)
 {
        VALUE_PAIR *vp;
 
@@ -527,8 +521,7 @@ static size_t xlat_integer(UNUSED void *instance, REQUEST *request,
  * @brief Print data as hex, not as VALUE.
  */
 static size_t xlat_hex(UNUSED void *instance, REQUEST *request,
-                      const char *fmt, char *out, size_t outlen,
-                      UNUSED RADIUS_ESCAPE_STRING func)
+                      const char *fmt, char *out, size_t outlen)
 {
        size_t i;
        uint8_t *p;
@@ -562,8 +555,7 @@ static size_t xlat_hex(UNUSED void *instance, REQUEST *request,
  * @brief Prints the current module processing the request
  */
 static size_t xlat_module(UNUSED void *instance, REQUEST *request,
-                         UNUSED const char *fmt, char *out, size_t outlen,
-                         UNUSED RADIUS_ESCAPE_STRING func)
+                         UNUSED const char *fmt, char *out, size_t outlen)
 {
        strlcpy(out, request->module, outlen);
 
@@ -577,8 +569,7 @@ static size_t xlat_module(UNUSED void *instance, REQUEST *request,
  * @see modcall()
  */
 static size_t xlat_foreach(void *instance, REQUEST *request,
-                          UNUSED const char *fmt, char *out, size_t outlen,
-                          RADIUS_ESCAPE_STRING func)
+                          UNUSED const char *fmt, char *out, size_t outlen)
 {
        VALUE_PAIR      **pvp;
 
@@ -592,7 +583,7 @@ static size_t xlat_foreach(void *instance, REQUEST *request,
                return 0;
        }
 
-       return valuepair2str(out, outlen, (*pvp), (*pvp)->type, func);  
+       return valuepair2str(out, outlen, (*pvp), (*pvp)->type);
 }
 #endif
 
@@ -604,8 +595,7 @@ static size_t xlat_foreach(void *instance, REQUEST *request,
  * expand to "\n\n\n"
  */
 static size_t xlat_string(UNUSED void *instance, REQUEST *request,
-                         const char *fmt, char *out, size_t outlen,
-                         UNUSED RADIUS_ESCAPE_STRING func)
+                         const char *fmt, char *out, size_t outlen)
 {
        int len;
        VALUE_PAIR *vp;
@@ -635,8 +625,7 @@ static size_t xlat_string(UNUSED void *instance, REQUEST *request,
  * @brief Expand regexp matches %{0} to %{8}
  */
 static size_t xlat_regex(void *instance, REQUEST *request,
-                        const char *fmt, char *out, size_t outlen,
-                        RADIUS_ESCAPE_STRING func)
+                        const char *fmt, char *out, size_t outlen)
 {
        char *regex;
 
@@ -645,7 +634,6 @@ static size_t xlat_regex(void *instance, REQUEST *request,
         *      are already in the "instance".
         */
        fmt = fmt;              /* -Wunused */
-       func = func;            /* -Wunused FIXME: do escaping? */
 
        regex = request_data_reference(request, request,
                                 REQUEST_DATA_REGEX | *(int *)instance);
@@ -666,8 +654,7 @@ static size_t xlat_regex(void *instance, REQUEST *request,
  * Example %{debug:3}
  */
 static size_t xlat_debug(UNUSED void *instance, REQUEST *request,
-                        const char *fmt, char *out, size_t outlen,
-                        UNUSED RADIUS_ESCAPE_STRING func)
+                        const char *fmt, char *out, size_t outlen)
 {
        int level = 0;
        
@@ -1119,8 +1106,21 @@ do_xlat:
 
        if (!c->internal) RDEBUG3("radius_xlat: Running registered xlat function of module %s for string \'%s\'",
                                  c->module, xlat_str);
-       retlen = c->do_xlat(c->instance, request, xlat_str,
-                           q, freespace, func);
+       if (func) {
+               /* xlat to a temporary buffer, then escape */
+               char tmpbuf[8192];
+               retlen = c->do_xlat(c->instance, request, xlat_str, tmpbuf, sizeof(tmpbuf));
+               if (retlen > 0) {
+                       retlen = func(q, freespace, tmpbuf);
+                       if (retlen > 0) {
+                               RDEBUG2("string escaped from \'%s\' to \'%s\'", tmpbuf, q);
+                       } else if (retlen < 0) {
+                               RDEBUG2("string escape failed");
+                       }
+               }
+       } else {
+               retlen = c->do_xlat(c->instance, request, xlat_str, q, freespace);
+       }
        if (retlen > 0) {
                if (do_length) {
                        snprintf(q, freespace, "%d", retlen);
index 014550c53db92329f62ff7909fad76cdd440804d..1499cae93ed0d7be4f4cf73ad07d9875155d2d34 100644 (file)
@@ -362,8 +362,7 @@ static int cache_verify(rlm_cache_t *inst)
  *     Allow single attribute values to be retrieved from the cache.
  */
 static size_t cache_xlat(void *instance, REQUEST *request,
-                     const char *fmt, char *out, size_t freespace,
-                     UNUSED RADIUS_ESCAPE_STRING func)
+                     const char *fmt, char *out, size_t freespace)
 {
        rlm_cache_entry_t *c;
        rlm_cache_t *inst = instance;
index 5f163196dcf908b26a3e9010e4e7a9279e440dc0..adf8dbcf245540d5e55211121a7062d6648a292b 100644 (file)
@@ -118,8 +118,7 @@ static VALUE_PAIR **decode_string(REQUEST *request, const char *string)
  *     Do xlat of strings.
  */
 static size_t exec_xlat(void *instance, REQUEST *request,
-                    const char *fmt, char *out, size_t outlen,
-                    UNUSED RADIUS_ESCAPE_STRING func)
+                    const char *fmt, char *out, size_t outlen)
 {
        int             result;
        rlm_exec_t      *inst = instance;
index b1097fbcdd26d0daa5f3f964141570e6fdd25d22..401084b47a030e21e45ca1fdb0ff515e4fe49203 100644 (file)
@@ -235,7 +235,7 @@ static int get_number(REQUEST *request, const char **string, int64_t *answer)
  *  Do xlat of strings!
  */
 static size_t expr_xlat(void *instance, REQUEST *request, const char *fmt,
-                       char *out, size_t outlen, RADIUS_ESCAPE_STRING func)
+                       char *out, size_t outlen)
 {
        int             rcode;
        int64_t         result;
@@ -248,7 +248,7 @@ static size_t expr_xlat(void *instance, REQUEST *request, const char *fmt,
        /*
         * Do an xlat on the provided string (nice recursive operation).
         */
-       if (!radius_xlat(buffer, sizeof(buffer), fmt, request, func, NULL)) {
+       if (!radius_xlat(buffer, sizeof(buffer), fmt, request, NULL, NULL)) {
                radlog(L_ERR, "rlm_expr: xlat failed.");
                *out = '\0';
                return 0;
@@ -277,8 +277,7 @@ static size_t expr_xlat(void *instance, REQUEST *request, const char *fmt,
  *
  */
 static size_t rand_xlat(UNUSED void *instance, REQUEST *request, const char *fmt,
-                       char *out, size_t outlen,
-                       RADIUS_ESCAPE_STRING func)
+                       char *out, size_t outlen)
 {
        int64_t         result;
        char            buffer[256];
@@ -286,7 +285,7 @@ static size_t rand_xlat(UNUSED void *instance, REQUEST *request, const char *fmt
        /*
         * Do an xlat on the provided string (nice recursive operation).
         */
-       if (!radius_xlat(buffer, sizeof(buffer), fmt, request, func, NULL)) {
+       if (!radius_xlat(buffer, sizeof(buffer), fmt, request, NULL, NULL)) {
                radlog(L_ERR, "rlm_expr: xlat failed.");
                *out = '\0';
                return 0;
@@ -314,8 +313,7 @@ static size_t rand_xlat(UNUSED void *instance, REQUEST *request, const char *fmt
  *  Format identical to String::Random.
  */
 static size_t randstr_xlat(UNUSED void *instance, REQUEST *request,
-                          const char *fmt, char *out, size_t outlen,
-                          RADIUS_ESCAPE_STRING func)
+                          const char *fmt, char *out, size_t outlen)
 {
        char            *p;
        char            buffer[1024];
@@ -328,7 +326,7 @@ static size_t randstr_xlat(UNUSED void *instance, REQUEST *request,
        /*
         * Do an xlat on the provided string (nice recursive operation).
         */
-       len = radius_xlat(buffer, sizeof(buffer), fmt, request, func, NULL);
+       len = radius_xlat(buffer, sizeof(buffer), fmt, request, NULL, NULL);
        if (!len) {
                radlog(L_ERR, "rlm_expr: xlat failed.");
                *out = '\0';
@@ -426,8 +424,7 @@ static size_t randstr_xlat(UNUSED void *instance, REQUEST *request,
  * Example: "%{urlquote:http://example.org/}" == "http%3A%47%47example.org%47"
  */
 static size_t urlquote_xlat(UNUSED void *instance, REQUEST *request,
-                           const char *fmt, char *out, size_t outlen,
-                           UNUSED RADIUS_ESCAPE_STRING func)
+                           const char *fmt, char *out, size_t outlen)
 {
        char    *p;
        char    buffer[1024];
@@ -436,7 +433,7 @@ static size_t urlquote_xlat(UNUSED void *instance, REQUEST *request,
        
        if (outlen <= 1) return 0;
 
-       len = radius_xlat(buffer, sizeof(buffer), fmt, request, func, NULL);
+       len = radius_xlat(buffer, sizeof(buffer), fmt, request, NULL, NULL);
        if (!len) {
                radlog(L_ERR, "rlm_expr: xlat failed.");
                *out = '\0';
@@ -480,8 +477,7 @@ static size_t urlquote_xlat(UNUSED void *instance, REQUEST *request,
  * Example: "%{escape:<img>foo.jpg</img>}" == "=60img=62foo.jpg=60=/img=62"
  */
 static size_t escape_xlat(UNUSED void *instance, REQUEST *request,
-                         const char *fmt, char *out, size_t outlen,
-                         UNUSED RADIUS_ESCAPE_STRING func)
+                         const char *fmt, char *out, size_t outlen)
 {
        rlm_expr_t *inst = instance;
        char    *p;
@@ -491,7 +487,7 @@ static size_t escape_xlat(UNUSED void *instance, REQUEST *request,
        
        if (outlen <= 1) return 0;
 
-       len = radius_xlat(buffer, sizeof(buffer), fmt, request, func, NULL);
+       len = radius_xlat(buffer, sizeof(buffer), fmt, request, NULL, NULL);
        if (!len) {
                radlog(L_ERR, "rlm_expr: xlat failed.");
                *out = '\0';
@@ -532,15 +528,14 @@ static size_t escape_xlat(UNUSED void *instance, REQUEST *request,
  * Probably only works for ASCII
  */
 static size_t lc_xlat(UNUSED void *instance, REQUEST *request,
-                     const char *fmt, char *out, size_t outlen,
-                     UNUSED RADIUS_ESCAPE_STRING func)
+                     const char *fmt, char *out, size_t outlen)
 {
        char *p, *q;
        char buffer[1024];
 
        if (outlen <= 1) return 0;
 
-       if (!radius_xlat(buffer, sizeof(buffer), fmt, request, func, NULL)) {
+       if (!radius_xlat(buffer, sizeof(buffer), fmt, request, NULL, NULL)) {
                *out = '\0';
                return 0;
        }
@@ -564,15 +559,14 @@ static size_t lc_xlat(UNUSED void *instance, REQUEST *request,
  * Probably only works for ASCII
  */
 static size_t uc_xlat(UNUSED void *instance, REQUEST *request,
-                     const char *fmt, char *out, size_t outlen,
-                     UNUSED RADIUS_ESCAPE_STRING func)
+                     const char *fmt, char *out, size_t outlen)
 {
        char *p, *q;
        char buffer[1024];
 
        if (outlen <= 1) return 0;
 
-       if (!radius_xlat(buffer, sizeof(buffer), fmt, request, func, NULL)) {
+       if (!radius_xlat(buffer, sizeof(buffer), fmt, request, NULL, NULL)) {
                *out = '\0';
                return 0;
        }
@@ -594,15 +588,14 @@ static size_t uc_xlat(UNUSED void *instance, REQUEST *request,
  * Example: "%{md5:foo}" == "acbd18db4cc2f85cedef654fccc4a4d8"
  */
 static size_t md5_xlat(UNUSED void *instance, REQUEST *request,
-                      const char *fmt, char *out, size_t outlen,
-                      UNUSED RADIUS_ESCAPE_STRING func)
+                      const char *fmt, char *out, size_t outlen)
 {
        char buffer[1024];
        uint8_t digest[16];
        int i;
        FR_MD5_CTX ctx;
 
-       if (!radius_xlat(buffer, sizeof(buffer), fmt, request, func, NULL)) {
+       if (!radius_xlat(buffer, sizeof(buffer), fmt, request, NULL, NULL)) {
                *out = '\0';
                return 0;
        }
index f4a5bb5ab308de7db87b464b0e6fa19147165eb7..be9517253ff662112079d47c12c0ebff8285cec1 100644 (file)
@@ -362,7 +362,7 @@ static void     fieldcpy(char *, char **);
 #endif
 static VALUE_PAIR *ldap_pairget(LDAP *, LDAPMessage *, TLDAP_RADIUS *,VALUE_PAIR **,int, ldap_instance *);
 static int ldap_groupcmp(void *, REQUEST *, VALUE_PAIR *, VALUE_PAIR *, VALUE_PAIR *, VALUE_PAIR **);
-static size_t ldap_xlat(void *, REQUEST *, const char *, char *, size_t, RADIUS_ESCAPE_STRING);
+static size_t ldap_xlat(void *, REQUEST *, const char *, char *, size_t);
 static LDAP    *ldap_connect(void *instance, const char *, const char *, int, int *, char **);
 static int     read_mappings(ldap_instance* inst);
 
@@ -1214,8 +1214,7 @@ static int ldap_groupcmp(void *instance, REQUEST *req,
  * Do an xlat on an LDAP URL
  */
 static size_t ldap_xlat(void *instance, REQUEST *request, const char *fmt,
-                    char *out, size_t freespace,
-                    UNUSED RADIUS_ESCAPE_STRING func)
+                    char *out, size_t freespace)
 {
        char url[MAX_FILTER_STR_LEN];
        int res;
index a1bb55f5dffac5c01b9aaa36cd86ede9efbcf640..0a315f15cc38fc7839da2a3282df753ae1f67cf4 100644 (file)
@@ -165,8 +165,7 @@ typedef struct rlm_mschap_t {
  *     attributes.
  */
 static size_t mschap_xlat(void *instance, REQUEST *request,
-                      const char *fmt, char *out, size_t outlen,
-                      RADIUS_ESCAPE_STRING func)
+                      const char *fmt, char *out, size_t outlen)
 {
        size_t          i, data_len;
        uint8_t         *data = NULL;
@@ -177,8 +176,6 @@ static size_t mschap_xlat(void *instance, REQUEST *request,
 
        response = NULL;
 
-       func = func;            /* -Wunused */
-
        /*
         *      Challenge means MS-CHAPv1 challenge, or
         *      hash of MS-CHAPv2 challenge, and peer challenge.
index f489e12302d2d845bd5969d686694873ebefdb07..6de22053b961bb63d46208d5cfa42615e99e1032 100644 (file)
@@ -321,7 +321,7 @@ static XS(XS_radiusd_radlog)
  * The xlat function
  */
 static size_t perl_xlat(void *instance, REQUEST *request, char *fmt, char *out,
-                       size_t freespace, RADIUS_ESCAPE_STRING func)
+                       size_t freespace)
 {
 
        PERL_INST       *inst= (PERL_INST *) instance;
@@ -334,7 +334,7 @@ static size_t perl_xlat(void *instance, REQUEST *request, char *fmt, char *out,
        /*
         * Do an xlat on the provided string (nice recursive operation).
        */
-       if (!radius_xlat(params, sizeof(params), fmt, request, func, NULL)) {
+       if (!radius_xlat(params, sizeof(params), fmt, request, NULL, NULL)) {
                radlog(L_ERR, "rlm_perl: xlat failed.");
                return 0;
        }
index c80dbc8c872863ec64f4af09ec2cfa783822ad23..5eebae886899893908b6a9de61daac518793c9cf 100644 (file)
@@ -185,8 +185,7 @@ static size_t redis_escape_func(char *out, size_t outlen, const char *in)
 }
 
 static size_t redis_xlat(void *instance, REQUEST *request,
-                     const char *fmt, char *out, size_t freespace,
-                     UNUSED RADIUS_ESCAPE_STRING func)
+                     const char *fmt, char *out, size_t freespace)
 {
        REDIS_INST *inst = instance;
        REDISSOCK *dissocket;
index 2edaffb41e520268d1298cbfdc19ebce06330cc1..69e683597d8b90084d18bcd88ce7081ebc4bfe51 100644 (file)
@@ -38,7 +38,7 @@ typedef struct rlm_soh_t {
 /*
  * Not sure how to make this useful yet...
  */
-static size_t soh_xlat(UNUSED void *instance, REQUEST *request, const char *fmt, char *out, size_t outlen, UNUSED RADIUS_ESCAPE_STRING func) {
+static size_t soh_xlat(UNUSED void *instance, REQUEST *request, const char *fmt, char *out, size_t outlen) {
 
        VALUE_PAIR* vp[6];
        const char *osname;
index aec8365fbbc5ffbfddcc00eb652652e9ed501de0..ef877c659cf796035be112620d6dac96fddcd84f 100644 (file)
@@ -135,8 +135,7 @@ static size_t sql_escape_func(char *out, size_t outlen, const char *in);
  *  returned instead.
  */
 static size_t sql_xlat(void *instance, REQUEST *request,
-                   const char *fmt, char *out, size_t freespace,
-                   UNUSED RADIUS_ESCAPE_STRING func)
+                   const char *fmt, char *out, size_t freespace)
 {
        SQLSOCK *sqlsocket;
        SQL_ROW row;