$darkmode
LDAP cache interface. More...
Go to the source code of this file.
Macros | |
| #define | CACHESECONDS 600 |
Functions | |
| int | search_cachebyname (const char *name, uuidtype_t *type, unsigned char *uuid) |
| Search cache by name and uuid type. More... | |
| int | add_cachebyname (const char *inname, const uuidp_t inuuid, const uuidtype_t type, const unsigned long uid) |
| int | search_cachebyuuid (uuidp_t uuidp, char **name, uuidtype_t *type) |
| int | add_cachebyuuid (uuidp_t inuuid, const char *inname, uuidtype_t type, const unsigned long uid) |
LDAP cache interface.
We need to cache all LDAP query results, they just take too long. We do hashing with chaining. Two caches are needed:
| #define CACHESECONDS 600 |
| int add_cachebyname | ( | const char * | inname, |
| const uuidp_t | inuuid, | ||
| const uuidtype_t | type, | ||
| const unsigned long | uid | ||
| ) |
| int add_cachebyuuid | ( | uuidp_t | inuuid, |
| const char * | inname, | ||
| uuidtype_t | type, | ||
| const unsigned long | uid | ||
| ) |
| int search_cachebyname | ( | const char * | name, |
| uuidtype_t * | type, | ||
| unsigned char * | uuid | ||
| ) |
Search cache by name and uuid type.
| [in] | name | name to search |
| [in,out] | type | type (user or group) of name, returns found type here which might mark it as a negative entry |
| [out] | uuid | found uuid is returned here |
| int search_cachebyuuid | ( | uuidp_t | uuidp, |
| char ** | name, | ||
| uuidtype_t * | type | ||
| ) |
Caller must free allocated name