![]() |
The FreeRADIUS server $Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
|
#include <freeradius-devel/server/base.h>#include <freeradius-devel/util/debug.h>#include <sys/stat.h>#include <libpq-fe.h>#include <postgres_ext.h>#include "config.h"#include "rlm_sql.h"#include "rlm_sql_trunk.h"
Include dependency graph for rlm_sql_postgresql.c:Go to the source code of this file.
Data Structures | |
| struct | rlm_sql_postgres_conn_t |
| struct | rlm_sql_postgresql_t |
| PostgreSQL configuration. More... | |
Macros | |
| #define | LOG_PREFIX "sql - postgresql" |
| #define | NAMEDATALEN 64 |
Functions | |
| static void | _sql_connect_io_notify (fr_event_list_t *el, int fd, UNUSED int flags, void *uctx) |
| static void | _sql_connect_query_run (connection_t *conn, UNUSED connection_state_t prev, UNUSED connection_state_t state, void *uctx) |
| static void | _sql_connection_close (fr_event_list_t *el, void *h, UNUSED void *uctx) |
| static connection_state_t | _sql_connection_init (void **h, connection_t *conn, void *uctx) |
| static int | affected_rows (PGresult *result) |
| Return the number of affected rows of the result as an int instead of the string that postgresql provides. | |
| static void | free_result_row (rlm_sql_postgres_conn_t *conn) |
| Free the row of the current result that's stored in the conn struct. | |
| static int | mod_instantiate (module_inst_ctx_t const *mctx) |
| static int | mod_load (void) |
| static int | sql_affected_rows (fr_sql_query_t *query_ctx, UNUSED rlm_sql_config_t const *config) |
| static sql_rcode_t | sql_classify_error (UNUSED PGresult const *result) |
| static size_t | sql_error (TALLOC_CTX *ctx, sql_log_entry_t out[], size_t outlen, fr_sql_query_t *query_ctx) |
| Retrieves any errors associated with the query context. | |
| static void * | sql_escape_arg_alloc (TALLOC_CTX *ctx, fr_event_list_t *el, void *uctx) |
| static void | sql_escape_arg_free (void *uctx) |
| static ssize_t | sql_escape_func (request_t *request, char *out, size_t outlen, char const *in, void *arg) |
| static unlang_action_t | sql_fetch_row (unlang_result_t *p_result, UNUSED request_t *request, void *uctx) |
| SQL_QUERY_FAIL static SQL_QUERY_RESUME sql_rcode_t | sql_fields (char const **out[], fr_sql_query_t *query_ctx, UNUSED rlm_sql_config_t const *config) |
| static sql_rcode_t | sql_free_result (fr_sql_query_t *query_ctx, UNUSED rlm_sql_config_t const *config) |
| static void | sql_request_cancel (connection_t *conn, void *preq, trunk_cancel_reason_t reason, UNUSED void *uctx) |
| static void | sql_request_cancel_mux (UNUSED fr_event_list_t *el, trunk_connection_t *tconn, connection_t *conn, UNUSED void *uctx) |
| static void | sql_trunk_request_demux (UNUSED fr_event_list_t *el, UNUSED trunk_connection_t *tconn, connection_t *conn, UNUSED void *uctx) |
| static SQL_TRUNK_CONNECTION_ALLOC void | sql_trunk_request_mux (UNUSED fr_event_list_t *el, trunk_connection_t *tconn, connection_t *conn, UNUSED void *uctx) |
Variables | |
| static conf_parser_t | driver_config [] |
| rlm_sql_driver_t | rlm_sql_postgresql |
| static sql_state_entry_t | sql_state_table [] |
| These are PostgreSQL specific error codes which are not covered in SQL 2011. | |
| struct rlm_sql_postgres_conn_t |
Definition at line 69 of file rlm_sql_postgresql.c.
Collaboration diagram for rlm_sql_postgres_conn_t:| Data Fields | ||
|---|---|---|
| int | affected_rows | |
| connection_t * | conn | Generic connection structure for this connection. |
| int | cur_row | |
| PGconn * | db | |
| int | fd | fd for this connection's I/O events. |
| int | num_fields | |
| fr_sql_query_t * | query_ctx | Current query running on this connection. |
| PGresult * | result | |
| char ** | row | |
| struct rlm_sql_postgresql_t |
PostgreSQL configuration.
Definition at line 63 of file rlm_sql_postgresql.c.
Collaboration diagram for rlm_sql_postgresql_t:| Data Fields | ||
|---|---|---|
| char const * | db_string | Text based configuration string. |
| bool | send_application_name | Whether we send the application name to PostgreSQL. |
| fr_trie_t * | states | sql state trie. |
| #define LOG_PREFIX "sql - postgresql" |
Definition at line 42 of file rlm_sql_postgresql.c.
| #define NAMEDATALEN 64 |
Definition at line 57 of file rlm_sql_postgresql.c.
|
static |
Definition at line 230 of file rlm_sql_postgresql.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Definition at line 273 of file rlm_sql_postgresql.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Definition at line 369 of file rlm_sql_postgresql.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Definition at line 311 of file rlm_sql_postgresql.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Return the number of affected rows of the result as an int instead of the string that postgresql provides.
Definition at line 141 of file rlm_sql_postgresql.c.
Here is the caller graph for this function:
|
static |
Free the row of the current result that's stored in the conn struct.
Definition at line 149 of file rlm_sql_postgresql.c.
Here is the caller graph for this function:
|
static |
|
static |
Definition at line 835 of file rlm_sql_postgresql.c.
|
static |
Definition at line 689 of file rlm_sql_postgresql.c.
|
static |
|
static |
Retrieves any errors associated with the query context.
| ctx | to allocate temporary error buffers in. |
| out | Array of sql_log_entrys to fill. |
| outlen | Length of out array. |
| query_ctx | Query context to retrieve error for. |
Definition at line 664 of file rlm_sql_postgresql.c.
Here is the call graph for this function:
|
static |
|
static |
|
static |
Definition at line 696 of file rlm_sql_postgresql.c.
|
static |
|
static |
Definition at line 580 of file rlm_sql_postgresql.c.
|
static |
|
static |
Definition at line 536 of file rlm_sql_postgresql.c.
|
static |
|
static |
|
static |
|
static |
Definition at line 81 of file rlm_sql_postgresql.c.
| rlm_sql_driver_t rlm_sql_postgresql |
Definition at line 877 of file rlm_sql_postgresql.c.
|
static |
These are PostgreSQL specific error codes which are not covered in SQL 2011.
Definition at line 89 of file rlm_sql_postgresql.c.
1.9.8