Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
* | users command: fixed display when more certificates are listed | David Sommerseth | 2008-12-10 | 1 | -0/+3 | |
| | ||||||
* | users cmd: Split useraccount(...) function into show_user(...) and ↵ | David Sommerseth | 2008-12-10 | 1 | -37/+119 | |
| | | | | | | | | | | | | | | | | | | | account_activation(...) The users --show command began to evolve into a more advanced show feature than initially planned, and needed more parameters to be more user friendly. These parameters on the other hand would not be needed for the activation and deactivation of an account. So the split became reasonable. Planned features for the show command is to show associated certificates as default. But you can then choose to show the lastlog of the log entries or the failed loggin attempts and blacklisted info for this user. These new features needs the database driver to be extended with a new argument to give a hint of which information we want to be extracted from the database. In addition, the eurephiaUSERINFO struct needs to be extended to embrace this information as well. | |||||
* | users command: Simplified the useraccount(...) function | David Sommerseth | 2008-12-10 | 1 | -70/+64 | |
| | | | | | Avoided duplicated code lines. Changed -n parameter to -u for the --username option | |||||
* | eurephiadb init: Only setup the requiered function pointers in driver | David Sommerseth | 2008-12-09 | 1 | -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. | |||||
* | BUGFIX: Fixed memset(...) going outside its boundaries | David Sommerseth | 2008-12-09 | 1 | -1/+1 | |
| | ||||||
* | users command; Added missing argument to the local help function (-s|--show) | David Sommerseth | 2008-12-09 | 1 | -0/+1 | |
| | ||||||
* | users command: Added showing associated certificates when using --show | David Sommerseth | 2008-12-09 | 1 | -2/+22 | |
| | ||||||
* | eDBadminGetUserList(...): Added certificate info into the eurephiaUSERINFO ↵ | David Sommerseth | 2008-12-09 | 1 | -2/+31 | |
| | | | | struct | |||||
* | Added eurephiaCERTINFO and eurephiaCERTLIST structs functions | David Sommerseth | 2008-12-09 | 3 | -18/+101 | |
| | | | | | | New functions to simplify using these structs in the code. Extended eurephiaUSERINFO to also have a eurephiaCERTLIST pointer, which can be used to store all associated certificates to this user. | |||||
* | Fixed wrong assert criteria | David Sommerseth | 2008-12-08 | 1 | -1/+1 | |
| | ||||||
* | users command: Implemented activate and deactivate account feature | David Sommerseth | 2008-12-08 | 1 | -0/+47 | |
| | ||||||
* | Do not encapsulate key-value pairs with () in UPDATE mode | David Sommerseth | 2008-12-08 | 1 | -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 struct | David Sommerseth | 2008-12-08 | 2 | -0/+6 | |
| | | | | | | | 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 Sommerseth | 2008-12-08 | 1 | -0/+4 | |
| | ||||||
* | edb-sqlite: Added update user function | David Sommerseth | 2008-12-08 | 1 | -3/+23 | |
| | ||||||
* | Added possibility to also set NULL values in UPDATE | David Sommerseth | 2008-12-08 | 2 | -2/+3 | |
| | ||||||
* | Update field mapping to include data type. Improved ↵ | David Sommerseth | 2008-12-08 | 5 | -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 login | David Sommerseth | 2008-12-08 | 1 | -0/+13 | |
| | ||||||
* | users command: Added --show action, to display user info | David Sommerseth | 2008-12-07 | 1 | -1/+35 | |
| | ||||||
* | Added eDBadminGetUserInfo(...) function, to retrieve user info | David Sommerseth | 2008-12-07 | 2 | -3/+47 | |
| | ||||||
* | Extended sqlite.[ch] with sqlite_query_mapped(...) | David Sommerseth | 2008-12-07 | 2 | -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 Sommerseth | 2008-12-07 | 4 | -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 == 0 | David Sommerseth | 2008-12-07 | 1 | -2/+6 | |
| | ||||||
* | users command: Added forgotten mode (show account details) | David Sommerseth | 2008-12-06 | 1 | -5/+24 | |
| | ||||||
* | users command: Added framework for activation and deactivation of an account | David Sommerseth | 2008-12-06 | 1 | -5/+65 | |
| | ||||||
* | More improvements to eurephia_getopt(...) | David Sommerseth | 2008-12-06 | 5 | -13/+12 | |
| | | | | | | Sending the argument incrementer as reference instead of as value. This way eurephia_getopt(...) can directly increase the incrementer on arguments with extra options. | |||||
* | Added missing copyright header, corrected another wrong file head | David Sommerseth | 2008-12-06 | 2 | -2/+21 | |
| | ||||||
* | users command: Extended the help section | David Sommerseth | 2008-12-06 | 1 | -0/+93 | |
| | ||||||
* | Changed from user-side field name 'recid' to simply 'id' | David Sommerseth | 2008-12-06 | 1 | -6/+7 | |
| | ||||||
* | BUGFIX: Do not try to parse arguments which are NULL | David Sommerseth | 2008-12-06 | 1 | -0/+4 | |
| | ||||||
* | Added missing shared source for edb-sqlite.so | David Sommerseth | 2008-12-06 | 1 | -0/+1 | |
| | ||||||
* | Moved over from earlier commit to use unified db translation | David Sommerseth | 2008-12-06 | 8 | -176/+54 | |
| | | | | | | | 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 mapping | David Sommerseth | 2008-12-06 | 2 | -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 definitions | David Sommerseth | 2008-12-06 | 2 | -0/+191 | |
| | ||||||
* | Renamed listuser command to users and improved arg parsing | David Sommerseth | 2008-12-06 | 3 | -6/+55 | |
| | | | | | Reorganised the command a little bit, to make it more generic for user management | |||||
* | Fixed a missing fclose() in ReadConfig (causing memory leak) | David Sommerseth | 2008-12-06 | 1 | -0/+1 | |
| | ||||||
* | Fixed memory leak in parsing arguments for the eDBconnect(...) call | David Sommerseth | 2008-12-06 | 1 | -0/+1 | |
| | ||||||
* | Removed debug from eurephia_arraycp(...) | David Sommerseth | 2008-12-06 | 1 | -1/+0 | |
| | ||||||
* | Added new function for copying char ** (arrays) | David Sommerseth | 2008-12-06 | 2 | -0/+20 | |
| | ||||||
* | Cleaned up listuser command and added missing freeing of eurephiaUSERLIST struct | David Sommerseth | 2008-12-06 | 2 | -2/+6 | |
| | ||||||
* | Added free function eurephiaUSERLIST structs. Added possible valgrind issue. | David Sommerseth | 2008-12-06 | 2 | -1/+13 | |
| | ||||||
* | BUGFIX: Fixed free() which valgrind complained about. | David Sommerseth | 2008-12-06 | 1 | -1/+1 | |
| | | | | | | Changed it from free_nullsafe() to free(), since we already check if session is null before we reach this free line. valgrind did not complain afterwards. | |||||
* | Added simple user lister (updated listusers command) | David Sommerseth | 2008-12-06 | 1 | -2/+53 | |
| | ||||||
* | Added sorting in db driver in eDBadminGetUserList(...). Improved comments. | David Sommerseth | 2008-12-06 | 2 | -6/+50 | |
| | ||||||
* | BUGFIX: Made some functions more nullsafe and fixed wrong function ↵ | David Sommerseth | 2008-12-06 | 2 | -6/+10 | |
| | | | | declaration in .h | |||||
* | BUGFIX: Removed a free_nullsafe(randdata) on the wrong place | David Sommerseth | 2008-12-06 | 1 | -1/+0 | |
| | ||||||
* | Added admin function to give a list of users | David Sommerseth | 2008-12-06 | 3 | -2/+81 | |
| | ||||||
* | Moved the typedef struct eFieldMap from *common.h to *struct.h | David Sommerseth | 2008-12-06 | 2 | -8/+17 | |
| | ||||||
* | Changed the sortkey type from int to const char * | David Sommerseth | 2008-12-06 | 2 | -10/+14 | |
| | ||||||
* | Added eurephia_admin_common.[ch] | David Sommerseth | 2008-12-06 | 2 | -0/+214 | |
| | | | | | | | Will contain common functions for the administration API. At the moment only a generic function which converts unified field names to proper database field names is implemented. This functions is made especially for sorting keys (ORDER BY <fields>) |