/* Check the winbindd cache directly. */
ret = idmap_cache_find_uid2sid(uid, psid, &expired);
- if (ret && is_null_sid(psid)) {
+ if (ret && !expired && is_null_sid(psid)) {
/*
* Negative cache entry, we already asked.
* do legacy.
/* Check the winbindd cache directly. */
ret = idmap_cache_find_gid2sid(gid, psid, &expired);
- if (ret && is_null_sid(psid)) {
+ if (ret && !expired && is_null_sid(psid)) {
/*
* Negative cache entry, we already asked.
* do legacy.
/* Check the winbindd cache directly. */
ret = idmap_cache_find_sid2uid(psid, puid, &expired);
- if (ret && (*puid == (uid_t)-1)) {
+ if (ret && !expired && (*puid == (uid_t)-1)) {
/*
* Negative cache entry, we already asked.
* do legacy.
/* Check the winbindd cache directly. */
ret = idmap_cache_find_sid2gid(psid, pgid, &expired);
- if (ret && (*pgid == (gid_t)-1)) {
+ if (ret && !expired && (*pgid == (gid_t)-1)) {
/*
* Negative cache entry, we already asked.
* do legacy.