Functions for processing attempts entries in the database. More...
#include <string.h>#include <unistd.h>#include <assert.h>#include <libxml/tree.h>#include <sqlite3.h>#include <eurephia_nullsafe.h>#include <eurephia_context.h>#include <eurephia_log.h>#include <eurephia_xml.h>#include <eurephia_values.h>#include <eurephiadb_session_struct.h>#include <eurephiadb_mapping.h>#include <passwd.h>#include "../sqlite.h"#include "../fieldmapping.h"
Include dependency graph for attempts.c:Go to the source code of this file.
Defines | |
| #define | FMAP_OVPNATTEMPTS |
Functions | |
| xmlDoc * | attempts_list (eurephiaCTX *ctx, eDBfieldMap *fmap) |
| xmlDoc * | attempts_reset (eurephiaCTX *ctx, eDBfieldMap *fmap) |
| xmlDoc * | attempts_delete (eurephiaCTX *ctx, eDBfieldMap *fmap) |
| xmlDoc * | eDBadminAttemptsLog (eurephiaCTX *ctx, xmlDoc *qryxml) |
Functions for processing attempts entries in the database.
Definition in file attempts.c.
| #define FMAP_OVPNATTEMPTS |
fieldmapping.h: Include declaration of tbl_sqlite_attempts
Definition at line 50 of file attempts.c.
| xmlDoc* attempts_delete | ( | eurephiaCTX * | ctx, | |
| eDBfieldMap * | fmap | |||
| ) |
Internal function. Deletes an entry from the attempts log
| ctx | eurephiaCTX | |
| fmap | eDBfieldMap containing the entry/entries to delete |
< Special field, should be used to indicate primary key of the table
< Alias for LOG_FATAL
< Operation failed and cannot continue. Log level always < 2
Definition at line 163 of file attempts.c.
Here is the call graph for this function:
Here is the caller graph for this function:| xmlDoc* attempts_list | ( | eurephiaCTX * | ctx, | |
| eDBfieldMap * | fmap | |||
| ) |
Internal function. Retrieves a list of all registered entries in the attempts table
| ctx | eurephiaCTX | |
| fmap | eDBfieldMap containing the search query |
< Alias for LOG_ERROR, in case it is not defined
< API errors but not sever, program can continue to run
Definition at line 61 of file attempts.c.
Here is the call graph for this function:
Here is the caller graph for this function:| xmlDoc* attempts_reset | ( | eurephiaCTX * | ctx, | |
| eDBfieldMap * | fmap | |||
| ) |
Internal function. Resets the attempts counter for one or more entries in the database
| ctx | eurephiaCTX | |
| fmap | eDBfieldMap defining which records to reset the attempts counter on |
< Special field, should be used to indicate primary key of the table
< Alias for LOG_FATAL
< Operation failed and cannot continue. Log level always < 2
Definition at line 128 of file attempts.c.
Here is the call graph for this function:
Here is the caller graph for this function:| xmlDoc* eDBadminAttemptsLog | ( | eurephiaCTX * | ctx, | |
| xmlDoc * | qryxml | |||
| ) |
Query or modify the attempts log.
| ctx | eurephiaCTX | |
| qryxml | document specifying the operation |
The XML format skeleton
<eurephia format="1"> <attemptslog mode="{search|reset|delete}"> <fieldMapping table="attempts"> <{field name}>{field value}</{field field}> </fieldMapping> </attemptslog> </eurephia>
Valid fields are: username, ip, digest, attempts, registered, lastattempt, id
< Messages intended when debugging. Only for log level > 10
< The context is used via the eurephiadm console utility
< The context is used via a web based utility
< Alias for LOG_CRITICAL
< Operation failed and might have been aborted. Log level always 0
< Alias for LOG_CRITICAL
< Operation failed and might have been aborted. Log level always 0
< Alias for LOG_ERROR, in case it is not defined
< API errors but not sever, program can continue to run
< Alias for LOG_ERROR, in case it is not defined
< API errors but not sever, program can continue to run
< Alias for LOG_ERROR, in case it is not defined
< API errors but not sever, program can continue to run
Definition at line 189 of file attempts.c.
Here is the call graph for this function:
1.7.1