]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
respect group_attribute and update it to sql.group
authorAlan T. DeKok <aland@freeradius.org>
Wed, 23 Aug 2023 14:23:09 +0000 (10:23 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Wed, 23 Aug 2023 14:23:09 +0000 (10:23 -0400)
src/modules/rlm_sql/rlm_sql.c
src/tests/modules/sql_mysql/module.conf
src/tests/modules/sql_postgresql/module.conf
src/tests/modules/sql_sqlite/module.conf

index bd5b51ef4e480117bcb1e17e90dd60e9dc4bb0ac..2afae3e5a7f73f26d739167af6803f702143a796 100644 (file)
@@ -1111,7 +1111,9 @@ static int mod_bootstrap(module_inst_ctx_t const *mctx)
                        goto error;
                }
 
-               if (cf_section_name2(conf)) {
+               if (inst->config.group_attribute) {
+                       group_attribute = inst->config.group_attribute;
+               } else if (cf_section_name2(conf)) {
                        snprintf(buffer, sizeof(buffer), "%s.group", mctx->inst->name);
                        group_attribute = buffer;
                } else {
index 7392c1ce82404a4bbe047517f0ef32ac609d4cdd..6d6efecee56769dad6387c36a654ff3fb595d897 100644 (file)
@@ -38,7 +38,7 @@ sql {
        }
 
        # The group attribute specific to this instance of rlm_sql
-       group_attribute = "SQL-Group"
+       group_attribute = "sql.group"
 
        # Read database-specific queries
        $INCLUDE ${modconfdir}/${.:name}/main/${dialect}/queries.conf
index e03bd7c47c06ec5f2a31a075b8b81cab5fa0b9ac..142d81b6717617014758ff7251980962276a7392 100644 (file)
@@ -38,7 +38,7 @@ sql {
        }
 
        # The group attribute specific to this instance of rlm_sql
-       group_attribute = "SQL-Group"
+       group_attribute = "sql.group"
 
        # Read database-specific queries
        $INCLUDE ${modconfdir}/${.:name}/main/${dialect}/queries.conf
index 3a5f75c87a663aafa1acaef10fe8c14fb2f72f3e..c11889bea746bd8a5609bfa80da0d5e49b8ffa4e 100644 (file)
@@ -38,7 +38,7 @@ sql {
        }
 
        # The group attribute specific to this instance of rlm_sql
-       group_attribute = "SQL-Group"
+       group_attribute = "sql.group"
 
        # Read database-specific queries
        $INCLUDE ${modconfdir}/${.:name}/main/${dialect}/queries.conf