From b09cd3072153663bfcce902633b5e6f9134e72e0 Mon Sep 17 00:00:00 2001 From: Fabiano FidĂȘncio Date: Mar 29 2018 18:15:25 +0000 Subject: KCM: Adjust REPLY_MAX to the one used in krb5 krb5 has its MAX_REPLY_SIZE set as 10*1024*1024, as seen in: https://github.com/krb5/krb5/blob/master/src/lib/krb5/ccache/cc_kcm.c#L53 Related: https://pagure.io/SSSD/sssd/issue/3386 Signed-off-by: Fabiano FidĂȘncio Reviewed-by: Jakub Hrozek --- diff --git a/src/responder/kcm/kcmsrv_ops.c b/src/responder/kcm/kcmsrv_ops.c index 7a78e9d..1e229ad 100644 --- a/src/responder/kcm/kcmsrv_ops.c +++ b/src/responder/kcm/kcmsrv_ops.c @@ -31,7 +31,10 @@ #include "responder/kcm/kcmsrv_ops.h" #include "responder/kcm/kcmsrv_ccache.h" -#define KCM_REPLY_MAX 16384 +/* This limit comes from: + * https://github.com/krb5/krb5/blob/master/src/lib/krb5/ccache/cc_kcm.c#L53 + */ +#define KCM_REPLY_MAX 10*1024*1024 struct kcm_op_ctx { struct kcm_resp_ctx *kcm_data; diff --git a/src/util/tev_curl.c b/src/util/tev_curl.c index 4c2f1ec..f8bede6 100644 --- a/src/util/tev_curl.c +++ b/src/util/tev_curl.c @@ -35,7 +35,8 @@ #include "util/tev_curl.h" #define TCURL_IOBUF_CHUNK 1024 -#define TCURL_IOBUF_MAX 16384 +/* This limit in the same one as KCM_REPLY_MAX */ +#define TCURL_IOBUF_MAX 10*1024*1024 static bool global_is_curl_initialized;