summaryrefslogtreecommitdiffstats
path: root/database
Commit message (Collapse)AuthorAgeFilesLines
...
* 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
* Rewrote eDBadminGetUserList(...) to use XMLDavid Sommerseth2008-12-162-27/+19
|
* Removed not needed pointer - found by compiler warningDavid Sommerseth2008-12-161-1/+1
|
* Completed rewriting eDBadminGetUserInfo(...) function for XMLDavid Sommerseth2008-12-132-14/+19
| | | | | This rewrite utilities the XML interface instead of the more static eurephiaUSERINFO struct.
* Completed rewriting eDBmkMapping_USERINFO(...) to eDBxmlMapping(...)David Sommerseth2008-12-132-64/+109
| | | | | | | | | | | | | | | | | | | 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.
* Moved libxml2 check from edb-sqlite to the global CMakeLists.txtDavid Sommerseth2008-12-131-5/+0
|
* Began porting eDBadminGetUserInfo(...) over to XMLDavid Sommerseth2008-12-131-50/+65
|
* Added sqlite functions for populating an XML document directlyDavid Sommerseth2008-12-132-0/+27
|
* Prepared for building with libxml2David Sommerseth2008-12-131-2/+11
|
* Modified flags againDavid Sommerseth2008-12-121-4/+17
| | | | | | Added RSETLASTUSED (last_accessed is set to NULL) and RSETLOGINCNT (lastlog table has been modified). NEVERUSED flag will only be set if last_accessed is NULL and login count == 0.
* Fixed yet another strange SQLite3 parsing issueDavid Sommerseth2008-12-111-1/+1
|
* Added ACCFLAG_ERRATTEMPT for flagging if the attempt counter > 0David Sommerseth2008-12-111-1/+4
|
* Corrected a lot of small errors, setting wrong flag and SQL mistakesDavid Sommerseth2008-12-111-4/+9
|
* Added logincount and setting user account flagsDavid Sommerseth2008-12-111-5/+17
|
* Enhanced table/field mapping and eDBmkMapping_USERINFO(...) to include ↵David Sommerseth2008-12-114-53/+62
| | | | possibility for table aliases
* Added functions for processing eurephiaACCESSINFO/eurephiaACCESSLISTDavid Sommerseth2008-12-112-3/+20
| | | | | | | | | | Implemented saving VPN access profile to the eurephiaCERTINFO struct and filling the eurephiaACCESSINFO with the proper information needed in the eDBadminGetUserInfo(...) function. The special thing about eurephiaACCESSINFO, is that it will not register duplicate records. And when the eurephiaCERTINFO is free'd, the eurephiaACCESSLIST will automatically be free'd as well.
* Updated eDBadminGetUserInfo(...) to take filtering parameterDavid Sommerseth2008-12-102-36/+55
|
* eurephiadb init: Only setup the requiered function pointers in driverDavid Sommerseth2008-12-091-1/+1
| | | | | | | | | | | | | | | | This is ment as a security enhancement. Do not setup the function pointers to functions which is not needed for the requested minimum driver API version. Calling any of these functions which is not set up would then cause a SEGV. In real life, this means that the eurephia-auth.so which only needs API version 1 now will not setup any pointers to the API version 2, which the eurephiadm utility needs. In the future it should be a 4th argument to the eDBlink_init(...), defining features to enable when loading the drivers. This should be a bitwise mask. So that API version can change whenever the driver includes more functions. But for now, this change is enough.
* eDBadminGetUserList(...): Added certificate info into the eurephiaUSERINFO ↵David Sommerseth2008-12-091-2/+31
| | | | struct
* Fixed wrong assert criteriaDavid Sommerseth2008-12-081-1/+1
|
* Do not encapsulate key-value pairs with () in UPDATE modeDavid Sommerseth2008-12-081-3/+13
| | | | | And added support for setting fields to NULL if flagged via the field type value ft_SETNULL
* 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.
* Fixed a couple of memory leaks in eDBadminUpdateUser(...)David Sommerseth2008-12-081-0/+4
|
* edb-sqlite: Added update user functionDavid Sommerseth2008-12-081-3/+23
|
* Added possibility to also set NULL values in UPDATEDavid Sommerseth2008-12-082-2/+3
|
* Update field mapping to include data type. Improved ↵David Sommerseth2008-12-085-72/+207
| | | | | | | | | | | | | | 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.
* edb-sqlite: Update openvpn_users.last_accessed = now() on successful loginDavid Sommerseth2008-12-081-0/+13
|
* Added eDBadminGetUserInfo(...) function, to retrieve user infoDavid Sommerseth2008-12-072-3/+47
|
* Extended sqlite.[ch] with sqlite_query_mapped(...)David Sommerseth2008-12-072-1/+35
| | | | | | | This functions does almost the same as sqlite_query(...), it takes an SQL statement without the WHERE clause. The where clause is built up based on the fields sent in via the eDBfieldMap struct, containing the fields and values to look for.
* Merged eurephiadb_common.[ch] into eurephiadb_mapping.[ch]David Sommerseth2008-12-074-125/+76
| | | | | The functions in eurephiadb_common.[ch] was only adding functions which was connected to the unified field mapping interface
* Fixed eDBmkMapping_USERINFO(...) to let the uid_str be NULL if uid == 0David Sommerseth2008-12-071-2/+6
|
* Added missing copyright header, corrected another wrong file headDavid Sommerseth2008-12-061-0/+20
|
* Changed from user-side field name 'recid' to simply 'id'David Sommerseth2008-12-061-6/+7
|
* Added missing shared source for edb-sqlite.soDavid Sommerseth2008-12-061-0/+1
|
* Moved over from earlier commit to use unified db translationDavid Sommerseth2008-12-065-9/+53
| | | | | | | 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 unified database field mappingDavid Sommerseth2008-12-062-0/+120
| | | | | | | | | | Added a new function for copying eurephiaUSERINFO struct over to a unified eDBfieldMap struct for building up SQL queries. This approach gives the possibility to only assign field names and table names in the database driver. This field mapping makes sure the identifiers from other modules will be translated into the proper field and table name.
* Improved and unified the db mapping functions and definitionsDavid Sommerseth2008-12-062-0/+191
|
* Added sorting in db driver in eDBadminGetUserList(...). Improved comments.David Sommerseth2008-12-062-6/+50
|
* Added admin function to give a list of usersDavid Sommerseth2008-12-062-1/+44
|
* Changed the sortkey type from int to const char *David Sommerseth2008-12-062-10/+14
|
* Changed admin functions to be prefixed with eDBadmin*, to unify the function ↵David Sommerseth2008-12-053-37/+37
| | | | name schema
* Moved administration functions (eDBadmin*) into adminstration.cDavid Sommerseth2008-12-033-364/+381
|
* Workaround to avoid getting existing eurephiadb template db block rebuildingDavid Sommerseth2008-12-031-1/+4
|
* Fixed wrong data type for the access variable in eDBadminAuth(...)David Sommerseth2008-12-031-2/+2
|
* BUGFIX: Logout works properly again and improved logout status changeDavid Sommerseth2008-12-031-7/+11
| | | | | | - cmd_Logout(...) used the wrong argv[] index for sessionkey. - Improved eDBadminValidateSession(...) to set status to '5' on sessions which are getting logged out due to missing privileges
* Changed the logout behaviour to avoid login and/or access control check when ↵David Sommerseth2008-12-032-6/+6
| | | | user is about to logout
* Enhanced the access control by introducing access levelsDavid Sommerseth2008-12-023-33/+75
|
* Added database functions for editing the openvpn_config tableDavid Sommerseth2008-12-023-0/+52
|
* Fixed memory leak. Was missing a sqlite_free_results(...)David Sommerseth2008-11-301-0/+1
|
* Added eDBadminLogout(...) function in database driverDavid Sommerseth2008-11-303-3/+44
| | | | | Added one more status code, for active sessions. Auto-logout will now also delete session variables