Lines Matching defs:cache

405  * Get the cache handle
408 get_cache_handle(sqlite **cache)
439 *cache = tsd->cache_db;
444 * Initialize cache and db
461 /* mappings, name/SID lookup cache + ephemeral IDs; OK to blow away */
1501 lookup_cache_sid2pid(sqlite *cache, idmap_mapping *req, idmap_id_res *res)
1538 /* SQL to lookup the cache */
1577 retcode = sql_compile_n_step_once(cache, sql, &vm, &ncol,
1716 * name cache table and so during an upgrade might still be visible.
1717 * In addition, the test suite prepopulates the cache with these values.
1741 lookup_cache_sid2name(sqlite *cache, const char *sidprefix, idmap_rid_t rid,
1761 /* SQL to lookup the cache */
1773 retcode = sql_compile_n_step_once(cache, sql, &vm, &ncol, 3, &values);
1820 lookup_name_cache(sqlite *cache, idmap_mapping *req, idmap_id_res *res)
1836 retcode = lookup_cache_sid2name(cache,
1841 retcode = lookup_cache_name2sid(cache, req->id1name,
1847 TRACE(req, res, "Not found in name cache");
1849 TRACE(req, res, "Name cache lookup error=%d", retcode);
1879 TRACE(req, res, "Found in name cache");
2527 * 3. Lookup cache.
2633 /* Lookup cache */
2634 retcode = lookup_cache_sid2pid(state->cache, req, res);
2636 TRACE(req, res, "Found in mapping cache");
2639 TRACE(req, res, "Mapping cache lookup error=%d", retcode);
2642 TRACE(req, res, "Not found in mapping cache");
2650 * Failed to find non-expired entry in cache. Next step is
2658 retcode = lookup_name_cache(state->cache, req, res);
3418 * - It could be from an expired ephemeral cache entry.
3421 * requests and the cache.
3591 /* Check if we need to cache anything */
3595 /* We don't cache negative entries */
3605 * unixname, well, we'd like to have it now for the cache.
3607 * If we truly always need it for the cache, we should probably
3610 * that we *do* need it in the cache; there's a decent argument
3611 * that the cache should contain only SIDs and PIDs, so we'll
3659 /* Don't cache other mapping types */
3690 retcode = sql_exec_no_cb(state->cache, IDMAP_CACHENAME, sql);
3718 retcode = sql_exec_no_cb(state->cache, IDMAP_CACHENAME, sql);
3741 /* Check if we need to cache anything */
3745 /* We don't cache negative entries */
3771 retcode = sql_exec_no_cb(state->cache, IDMAP_CACHENAME, sql);
3812 /* Don't cache other mapping types */
3840 retcode = sql_exec_no_cb(state->cache, IDMAP_CACHENAME, sql);
3868 retcode = sql_exec_no_cb(state->cache, IDMAP_CACHENAME, sql);
3878 lookup_cache_pid2sid(sqlite *cache, idmap_mapping *req, idmap_id_res *res,
3899 /* SQL to lookup the cache by pid or by unixname */
3933 cache, sql, &vm, &ncol, 14, &values);
4072 * cache sqlite handle
4088 sqlite *cache,
4117 /* SQL to lookup the cache */
4131 retcode = sql_compile_n_step_once(cache, sql, &vm, &ncol, 4, &values);
4276 * cache sqlite handle to cache
4293 sqlite *cache,
4323 /* Lookup cache */
4324 retcode = lookup_cache_name2sid(cache, name, domain, canonname,
4363 * Entry found (cache or Windows lookup)
4511 retcode = lookup_name2sid(state->cache,
4642 * 2. Lookup cache.
4693 /* Lookup in cache */
4694 retcode = lookup_cache_pid2sid(state->cache, req, res, is_user);
4696 TRACE(req, res, "Found in mapping cache");
4700 "Mapping cache lookup error=%d", retcode);
4703 TRACE(req, res, "Not found in mapping cache");
4758 * Failed to find non-expired entry in cache. Set the flag to
4899 sqlite *cache = NULL;
4920 rc = get_cache_handle(&cache);
4925 * Note that we flush the idmapd cache first, before the kernel
4926 * cache. If we did it the other way 'round, a request could come
4927 * in after the kernel cache flush and pull a soon-to-be-flushed
4928 * idmapd cache entry back into the kernel cache. This way the
4930 * the kernel cache and then immediately flushed.
4933 rc = sql_exec_no_cb(cache, IDMAP_CACHENAME, sql1);
4937 rc = sql_exec_no_cb(cache, IDMAP_CACHENAME, sql2);