Blame SOURCES/0052-IFP-use-default-limit-if-provided-is-0.patch

6cf099
From 504604a3e90c8bad36d1919e13e0bf37f094ee2a Mon Sep 17 00:00:00 2001
6cf099
From: =?UTF-8?q?Pavel=20B=C5=99ezina?= <pbrezina@redhat.com>
6cf099
Date: Thu, 13 Aug 2015 12:46:59 +0200
6cf099
Subject: [PATCH 52/57] IFP: use default limit if provided is 0
6cf099
6cf099
Returning zero values doesn't make any sense, so we may use it as
6cf099
"use sssd configuration instead".
6cf099
6cf099
Reviewed-by: Petr Cech <pcech@redhat.com>
6cf099
---
6cf099
 src/responder/ifp/ifpsrv_util.c | 4 +++-
6cf099
 1 file changed, 3 insertions(+), 1 deletion(-)
6cf099
6cf099
diff --git a/src/responder/ifp/ifpsrv_util.c b/src/responder/ifp/ifpsrv_util.c
6cf099
index 3b02fd06f5227e4ffc3d40ffb20fed981c5028a7..904c4f62ec5653a534877fd6870832128720b694 100644
6cf099
--- a/src/responder/ifp/ifpsrv_util.c
6cf099
+++ b/src/responder/ifp/ifpsrv_util.c
6cf099
@@ -274,7 +274,9 @@ ifp_is_user_attr_allowed(struct ifp_ctx *ifp_ctx, const char *attr)
6cf099
 
6cf099
 static uint32_t ifp_list_limit(struct ifp_ctx *ctx, uint32_t limit)
6cf099
 {
6cf099
-    if (ctx->wildcard_limit) {
6cf099
+    if (limit == 0) {
6cf099
+        return ctx->wildcard_limit;
6cf099
+    } else if (ctx->wildcard_limit) {
6cf099
         return MIN(ctx->wildcard_limit, limit);
6cf099
     } else {
6cf099
         return limit;
6cf099
-- 
6cf099
2.4.3
6cf099