summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSumit Bose <sbose@redhat.com>2012-07-02 14:28:03 +0200
committerStephen Gallagher <sgallagh@redhat.com>2012-07-06 11:44:45 -0400
commitf1a7e4a6e4f2d453077da8b3606feebb7669ef4f (patch)
treea4d0f379990a16558df2f834d7497ec4bb77d732 /src
parentf4e497df7dab24d2a6f256559433d2eebbe5e46c (diff)
downloadsssd-f1a7e4a6e4f2d453077da8b3606feebb7669ef4f.tar.gz
sssd-f1a7e4a6e4f2d453077da8b3606feebb7669ef4f.tar.bz2
sssd-f1a7e4a6e4f2d453077da8b3606feebb7669ef4f.zip
Set file descriptor limits in pac responder
Diffstat (limited to 'src')
-rw-r--r--src/responder/pac/pacsrv.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/responder/pac/pacsrv.c b/src/responder/pac/pacsrv.c
index b21bb966..db6e6b49 100644
--- a/src/responder/pac/pacsrv.c
+++ b/src/responder/pac/pacsrv.c
@@ -44,6 +44,7 @@
#include "sbus/sbus_client.h"
#define SSS_PAC_PIPE_NAME "pac"
+#define DEFAULT_PAC_FD_LIMIT 8192
struct sbus_method monitor_pac_methods[] = {
{ MON_CLI_METHOD_PING, monitor_common_pong },
@@ -122,6 +123,7 @@ int pac_process_init(TALLOC_CTX *mem_ctx,
struct pac_ctx *pac_ctx;
int ret, max_retries;
enum idmap_error_code err;
+ int fd_limit;
pac_ctx = talloc_zero(mem_ctx, struct pac_ctx);
if (!pac_ctx) {
@@ -167,6 +169,19 @@ int pac_process_init(TALLOC_CTX *mem_ctx,
return EFAULT;
}
+ /* Set up file descriptor limits */
+ ret = confdb_get_int(pac_ctx->rctx->cdb,
+ CONFDB_PAC_CONF_ENTRY,
+ CONFDB_SERVICE_FD_LIMIT,
+ DEFAULT_PAC_FD_LIMIT,
+ &fd_limit);
+ if (ret != EOK) {
+ DEBUG(SSSDBG_FATAL_FAILURE,
+ ("Failed to set up file descriptor limit\n"));
+ return ret;
+ }
+ responder_set_fd_limit(fd_limit);
+
DEBUG(SSSDBG_TRACE_FUNC, ("PAC Initialization complete\n"));
return EOK;