summaryrefslogtreecommitdiffstats
path: root/src/responder
diff options
context:
space:
mode:
authorLukas Slebodnik <lslebodn@redhat.com>2015-05-15 14:11:56 +0200
committerJakub Hrozek <jhrozek@redhat.com>2015-05-22 12:30:54 +0200
commitfd60528321fd52720222ec35b895ade54cccb48d (patch)
tree3448cdd513f7a32d3d1a0eaf79d970cbcd7fc53b /src/responder
parent390de028b3130ae564059101c662fe74e0e85a45 (diff)
downloadsssd-fd60528321fd52720222ec35b895ade54cccb48d.tar.gz
sssd-fd60528321fd52720222ec35b895ade54cccb48d.tar.xz
sssd-fd60528321fd52720222ec35b895ade54cccb48d.zip
nss: Do not ignore default vaue of SYSDB_INITGR_EXPIRE
When SYSDB_INITGR_EXPIRE had default value (0) then value of SYSDB_CACHE_EXPIRE was used as initgroups expire attribute. The right apoach is already used in responder_cache_req.c Reviewed-by: Pavel Březina <pbrezina@redhat.com>
Diffstat (limited to 'src/responder')
-rw-r--r--src/responder/nss/nsssrv_cmd.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/responder/nss/nsssrv_cmd.c b/src/responder/nss/nsssrv_cmd.c
index 41586e9fc..012c4e701 100644
--- a/src/responder/nss/nsssrv_cmd.c
+++ b/src/responder/nss/nsssrv_cmd.c
@@ -632,9 +632,8 @@ errno_t check_cache(struct nss_dom_ctx *dctx,
if (req_type == SSS_DP_INITGROUPS) {
cacheExpire = ldb_msg_find_attr_as_uint64(res->msgs[0],
SYSDB_INITGR_EXPIRE,
- 1);
- }
- if (cacheExpire == 0) {
+ 0);
+ } else {
cacheExpire = ldb_msg_find_attr_as_uint64(res->msgs[0],
SYSDB_CACHE_EXPIRE,
0);