summaryrefslogtreecommitdiffstats
path: root/database/eurephiadb_mapping.c
Commit message (Collapse)AuthorAgeFilesLines
* Updated Copyright dates to include 2010David Sommerseth2010-05-251-1/+1
|
* eDBmkSortKeyString() will now return NULL if the result is emptyDavid Sommerseth2009-09-251-1/+1
|
* Rewrote the eDBmkSortKeys() function to use the eDBfieldMap returned from ↵David Sommerseth2009-09-251-7/+10
| | | | eDBxmlMapping()
* Added eDBmappingGetValue() to retrieve field values from a eDBfieldMap structDavid Sommerseth2009-09-211-0/+26
|
* Added missing comments for the generic database/ filesDavid Sommerseth2009-09-081-4/+76
|
* Added debug logging of free_nullsafe() calls as wellDavid Sommerseth2009-09-071-3/+3
|
* Moved all malloc() operations over to a calloc wrapper, malloc_nullsafe()David Sommerseth2009-09-071-2/+1
| | | | This also improves debugging as well, if debug logging is enabled and log level is >= 40.
* Removed header file which is no longer neededDavid Sommerseth2009-09-051-1/+0
|
* Improved some commentsDavid Sommerseth2009-08-291-8/+8
|
* Renamed fieldmapping for 'attempts' to 'attemptslog'David Sommerseth2009-05-061-1/+1
| | | | | | Also made the result XML from eDBadminAttemptsLog(...) more efficient by not adding the username/certificate/ipaddress group tags if the information is not present.
* Added eDBfieldMapping field for filter typesDavid Sommerseth2009-04-051-2/+26
| | | | | | | | | | | | | | | | | | | This field will be used to determine what kind of filter logic to add when building SQL queries. The filter type is set in the fieldMapping field nodes as an attribute named 'filter'. Their values and the corresponding SQL conditions are: filter | SQL condition -----------------------+--------------- equals | = not-equals | != / NOT(...) less-than | < less-than-equals | <= greater-than | > greater-than-equals | >= -----------------------+--------------- The default value for each field is set in the eurephiadb_mapping.h
* Added eDBmappingFieldsPresent(...) which returns used fields in a fieldMapDavid Sommerseth2009-04-021-0/+14
|
* Added fieldMapping for the firewall access table (openvpn_accesses)David Sommerseth2009-03-281-0/+6
|
* Made the licence explicit GPLv2 onlyDavid Sommerseth2009-03-261-1/+1
|
* Cleaned up the code a little bitDavid Sommerseth2009-03-261-3/+2
| | | | | Made sure we only include needed include files and checked that the copyright headers are equal and correct
* Added support for editing the eurephia_adminaccess tableDavid Sommerseth2009-03-221-0/+5
| | | | Implemented eDBadminEditAdminAccess(...) function in db driver
* Rewrote database driver (SQLite) to use eurephia_pwd_crypt(...)David Sommerseth2009-03-221-3/+4
| | | | Follow up from commit 062a3c92343a5fa371f8637f8bca88aacca14cc4
* Prepared passwdhash function to allow salting and be prepared for other ↵David Sommerseth2009-01-021-1/+2
| | | | hashing algorithms
* BUGFIX: Fixed missing 'break' statements in switch for the ↵David Sommerseth2008-12-251-1/+4
| | | | eDBgetTableFieldMapping(...) function
* Added usercerts to the table name mapping tableDavid Sommerseth2008-12-251-0/+1
|
* Added check if fieldMapping node's table attribute is setDavid Sommerseth2008-12-251-0/+5
|
* Added field mapping for the openvpn_usercerts tableDavid Sommerseth2008-12-251-0/+3
|
* Changed from numeric session status code to text in eDBadminGetUserInfo(...) ↵David Sommerseth2008-12-191-0/+11
| | | | - lastlog
* Fixed segfault and wrong XML node extraction in eDBxmlMapping(...)David Sommerseth2008-12-181-2/+2
|
* Added pwhash attribute in fieldMapping XML for password fields.David Sommerseth2008-12-181-5/+19
| | | | | | | This attribute can be "sha512" if the contents of the field is already hashed with SHA512. The other official value is "none", which will then tell eDBxmlMapping(...) to hash the value. Unknown values will be treated like 'none'.
* eDBxmlMapping(...) did not honor the setnull attribute correctly.David Sommerseth2008-12-181-10/+17
|
* Rewrote eDBxmlMapping(...) to take an XML node instead of a complete XML ↵David Sommerseth2008-12-171-11/+33
| | | | | | | | document as input. The node name of the input node must be <fieldMapping/>. In addition this node must have an attribute called "table" which must match the eDBfieldMap* structure given as input.
* Changed eDBxmlMapping(...) function to make use of the new ↵David Sommerseth2008-12-171-1/+3
| | | | eurephiaXML_getRoot(...) function
* BUGFIX: Made the eDBmkSortKeyString(...) function work againDavid Sommerseth2008-12-161-8/+10
| | | | | The function did not work after the change of the field mapping system changed when reworking things from eurephiaUSER{LIST,INFO} to XML
* Removed not needed pointer - found by compiler warningDavid Sommerseth2008-12-161-1/+1
|
* Completed rewriting eDBmkMapping_USERINFO(...) to eDBxmlMapping(...)David Sommerseth2008-12-131-60/+99
| | | | | | | | | | | | | | | | | | | This new mapping function uses a flexible XML document as input, and will be generic to all other tables as well. XML structure is: <fieldMapping table="{table name}> <{fieldname}>{value}</{fieldname}> </fieldMapping> An example: <fieldMapping table="users"> <uid>1</uid> <username>testuser1</username> </fieldMapping> This function will return a eDBfieldMap structure contatining the proper fieldnames with values assigned, depending on the database map given when called.
* Enhanced table/field mapping and eDBmkMapping_USERINFO(...) to include ↵David Sommerseth2008-12-111-7/+11
| | | | possibility for table aliases
* Added setnull_flag in the eurephiaUSERINFO structDavid Sommerseth2008-12-081-0/+5
| | | | | | | This can make it possible to get a value getting set to NULL if this flag contains the FIELD_* value of the field being set to NULL. If more fields wants to be reset, these field values can be bitwise ORed together into the setnull_flag.
* Update field mapping to include data type. Improved ↵David Sommerseth2008-12-081-4/+4
| | | | | | | | | | | | | | sqlite_query_mapped(...) function The new sqlite_query_mapped(...) function will now consider the field type when formatting the data values for SQLite. In addition reserved words on the DATETIME data type will be preserved without quote encapsulation. Improved the sqlite_query_mapped(...) to also handle UPDATE, INSERT and DELETE in addition to SELECT. The function now needs two eDBfieldMap mappings. The first one will contain update/insert values, while the last one defines search criteria.
* Merged eurephiadb_common.[ch] into eurephiadb_mapping.[ch]David Sommerseth2008-12-071-0/+74
| | | | | The functions in eurephiadb_common.[ch] was only adding functions which was connected to the unified field mapping interface
* Moved over from earlier commit to use unified db translationDavid Sommerseth2008-12-061-0/+41
| | | | | | | In other words, rewrote commit 6d4373e026b3f12c5685e45e35f9f060379ed0f3. Moved over all functions from that commit which could take advantage of the new API for unified table/field translation.
* Improved and unified the db mapping functions and definitionsDavid Sommerseth2008-12-061-0/+66