replacement for FR function
Hi All! Is there any replacement for "userparse" (FR 2) function (located in lib/valuepair.c) ? I need a function to convert my comma-separated string to VALUE_PAIR
On Oct 12, 2015, at 5:28 AM, Lotkov Svyatoslav <ellezdi@gmail.com> wrote:
Is there any replacement for "userparse" (FR 2) function (located in lib/valuepair.c) ? I need a function to convert my comma-separated string to VALUE_PAIR
In 3.0.10, use fr_pair_list_afrom_str() We don't recommend making custom modules for older versions of the server. The internal API has changed due to cleanups and bug fixes. Alan DeKok.
Hi, Alan. Thanks for aimg me. I'm trying to rewrite my module for FR1/2 to FR3 Svyatoslav Lotkov 2015-10-12 16:00 GMT+03:00 Alan DeKok <aland@deployingradius.com>:
On Oct 12, 2015, at 5:28 AM, Lotkov Svyatoslav <ellezdi@gmail.com> wrote:
Is there any replacement for "userparse" (FR 2) function (located in lib/valuepair.c) ? I need a function to convert my comma-separated string to VALUE_PAIR
In 3.0.10, use fr_pair_list_afrom_str()
We don't recommend making custom modules for older versions of the server. The internal API has changed due to cleanups and bug fixes.
Alan DeKok.
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Hi All. How can I validate value-pair's value against avpair ? This is done in FR2 by pairparsevalue() function. I tried to use fr_pair_value_from_str() like this: //else if (pairparsevalue(*last, d) == NULL) { else if (fr_pair_value_from_str(*last, d, sizeof(d)) == -1 ) { But the result is: Bad talloc magic value - unknown value talloc abort: Bad talloc magic value - unknown value 2015-10-13 11:11 GMT+03:00 Lotkov Svyatoslav <ellezdi@gmail.com>:
Hi, Alan.
Thanks for aimg me. I'm trying to rewrite my module for FR1/2 to FR3
Svyatoslav Lotkov
2015-10-12 16:00 GMT+03:00 Alan DeKok <aland@deployingradius.com>:
On Oct 12, 2015, at 5:28 AM, Lotkov Svyatoslav <ellezdi@gmail.com> wrote:
Is there any replacement for "userparse" (FR 2) function (located in lib/valuepair.c) ? I need a function to convert my comma-separated string to VALUE_PAIR
In 3.0.10, use fr_pair_list_afrom_str()
We don't recommend making custom modules for older versions of the server. The internal API has changed due to cleanups and bug fixes.
Alan DeKok.
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
On Oct 14, 2015, at 10:20 AM, Lotkov Svyatoslav <ellezdi@gmail.com> wrote:
How can I validate value-pair's value against avpair ? This is done in FR2 by pairparsevalue() function.
I tried to use fr_pair_value_from_str() like this:
//else if (pairparsevalue(*last, d) == NULL) {
else if (fr_pair_value_from_str(*last, d, sizeof(d)) == -1 ) {
But the result is:
Bad talloc magic value - unknown value talloc abort: Bad talloc magic value - unknown value
Probably because you didn't allocate the VALUE_PAIR using the correct functions. Don't call malloc(). Call the various pair() functions to create it by name or by number. Alan DeKok.
On Oct 14, 2015, at 10:37 AM, Alan DeKok <aland@deployingradius.com> wrote:
On Oct 14, 2015, at 10:20 AM, Lotkov Svyatoslav <ellezdi@gmail.com> wrote:
How can I validate value-pair's value against avpair ? This is done in FR2 by pairparsevalue() function.
I tried to use fr_pair_value_from_str() like this:
//else if (pairparsevalue(*last, d) == NULL) {
else if (fr_pair_value_from_str(*last, d, sizeof(d)) == -1 ) {
But the result is:
Bad talloc magic value - unknown value talloc abort: Bad talloc magic value - unknown value
Probably because you didn't allocate the VALUE_PAIR using the correct functions.
Don't call malloc(). Call the various pair() functions to create it by name or by number.
Added notes here: http://wiki.freeradius.org/contributing/Modules3#talloc -Arran
participants (3)
-
Alan DeKok -
Arran Cudbard-Bell -
Lotkov Svyatoslav