summaryrefslogtreecommitdiffstats
path: root/src/responder/nss/nsssrv_netgroup.c
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2012-12-02 19:05:44 +0100
committerJakub Hrozek <jhrozek@redhat.com>2012-12-07 18:39:44 +0100
commit23274f7939b47597be98f2a9e076af8860b644c4 (patch)
tree93027450bd982d350e626015693e0a6e2e422745 /src/responder/nss/nsssrv_netgroup.c
parent7810b6553c14636d872c3c8df71070f2d4092c10 (diff)
downloadsssd-23274f7939b47597be98f2a9e076af8860b644c4.tar.gz
sssd-23274f7939b47597be98f2a9e076af8860b644c4.tar.xz
sssd-23274f7939b47597be98f2a9e076af8860b644c4.zip
NSS: Fix netgroup midpoint cache refresh1.9.2-35
https://fedorahosted.org/sssd/ticket/1683 The result of the percent calculation was always 0 as it used plain ints. The patch switches to using explicit floats to avoid reintroducing the bug again even with brackets.
Diffstat (limited to 'src/responder/nss/nsssrv_netgroup.c')
-rw-r--r--src/responder/nss/nsssrv_netgroup.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/responder/nss/nsssrv_netgroup.c b/src/responder/nss/nsssrv_netgroup.c
index ae993fac6..4b10b1819 100644
--- a/src/responder/nss/nsssrv_netgroup.c
+++ b/src/responder/nss/nsssrv_netgroup.c
@@ -535,7 +535,7 @@ static errno_t lookup_netgr_step(struct setent_step_ctx *step_ctx)
netgr->found = true;
if (step_ctx->nctx->cache_refresh_percent) {
lifetime = dom->netgroup_timeout *
- (step_ctx->nctx->cache_refresh_percent / 100);
+ (step_ctx->nctx->cache_refresh_percent / 100.0);
} else {
lifetime = dom->netgroup_timeout;
}