]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
catch things we know are wrong, instead of requiring SELECT
authorAlan T. DeKok <aland@freeradius.org>
Wed, 23 Jun 2021 13:22:37 +0000 (09:22 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Wed, 23 Jun 2021 13:22:37 +0000 (09:22 -0400)
which allows CALL to be used

src/modules/rlm_sql_map/rlm_sql_map.c

index 5443cf3c4f0ab21a9d0f6cc7c816adb0b1a46ed2..e720c8e7aa0158a69399f44bd0b180907d54f9e5 100644 (file)
@@ -317,8 +317,10 @@ static int mod_bootstrap(CONF_SECTION *conf, void *instance)
 
        while (isspace((int) *p)) p++;
 
-       if (strncasecmp(p, "select", 6) != 0) {
-               cf_log_err_cs(conf, "'query' MUST be 'SELECT ...', not 'INSERT' or 'UPDATE'");
+       if ((strncasecmp(p, "insert", 6) == 0) ||
+           (strncasecmp(p, "update", 6) == 0) ||
+           (strncasecmp(p, "delete", 6) == 0)) {
+               cf_log_err_cs(conf, "'query' MUST be 'SELECT ...', not 'INSERT', 'UPDATE', or 'DELETE'");
                return -1;
        }