* false if cache init failed
**/
-BOOL trustdom_cache_enable(void)
+bool trustdom_cache_enable(void)
{
/* Init trustdom cache by calling gencache initialisation */
if (!gencache_init()) {
* false if it failed
**/
-BOOL trustdom_cache_shutdown(void)
+bool trustdom_cache_shutdown(void)
{
/* Close trustdom cache by calling gencache shutdown */
if (!gencache_shutdown()) {
static char* trustdom_cache_key(const char* name)
{
char* keystr = NULL;
- asprintf(&keystr, TDOMKEY_FMT, strupper_static(name));
+ asprintf_strupper_m(&keystr, TDOMKEY_FMT, name);
return keystr;
}
* false if store attempt failed
**/
-BOOL trustdom_cache_store(char* name, char* alt_name, const DOM_SID *sid,
+bool trustdom_cache_store(char* name, char* alt_name, const DOM_SID *sid,
time_t timeout)
{
char *key, *alt_key;
fstring sid_string;
- BOOL ret;
+ bool ret;
/*
* we use gecache call to avoid annoying debug messages
return False;
DEBUG(5, ("trustdom_store: storing SID %s of domain %s\n",
- sid_string_static(sid), name));
+ sid_string_dbg(sid), name));
key = trustdom_cache_key(name);
alt_key = alt_name ? trustdom_cache_key(alt_name) : NULL;
* false if has expired/doesn't exist
**/
-BOOL trustdom_cache_fetch(const char* name, DOM_SID* sid)
+bool trustdom_cache_fetch(const char* name, DOM_SID* sid)
{
char *key = NULL, *value = NULL;
time_t timeout;
store the timestamp from the last update
*******************************************************************/
-BOOL trustdom_cache_store_timestamp( uint32 t, time_t timeout )
+bool trustdom_cache_store_timestamp( uint32 t, time_t timeout )
{
fstring value;