| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| |
|
|
| |
sqlite_query_mapped(...)
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
| |
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'.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
31911812e53a8fda5ce8fa8e9d45254053a580c5
|
| |
|
|
|
|
|
|
| |
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.
|
| |
|
|
| |
eurephiaXML_getRoot(...) function
|
| |
|
|
|
|
|
|
|
|
|
| |
Also rebased the XML file to always have a document root which
is <eurephia/>. This tag must contain a "format" attribute, which
should be 1 for the moment.
When parsing the XML, the eurephiaXML_getRoot(...) function will
return a pointer to the requested XML node inside the <eurephia/>
document root. The format version in the root element will also
be checked automatically.
|
| |
|
|
|
| |
The function did not work after the change of the field mapping system
changed when reworking things from eurephiaUSER{LIST,INFO} to XML
|
| | |
|
| | |
|
| |
|
|
|
| |
This rewrite utilities the XML interface instead of the more static
eurephiaUSERINFO struct.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
| |
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.
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
possibility for table aliases
|
| |
|
|
|
|
|
|
|
|
| |
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.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
| |
struct
|
| | |
|
| |
|
|
|
| |
And added support for setting fields to NULL if flagged via
the field type value ft_SETNULL
|
| |
|
|
|
|
|
| |
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.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| | |
|
| | |
|
| |
|
|
|
|
|
| |
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.
|
| |
|
|
|
| |
The functions in eurephiadb_common.[ch] was only adding functions
which was connected to the unified field mapping interface
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
| |
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.
|