summaryrefslogtreecommitdiff
path: root/src/login/logind.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2016-05-04 19:40:05 +0200
committerLennart Poettering <lennart@poettering.net>2016-05-05 22:50:09 +0200
commitc5a11ae268cf4188caf74d1acfd506a606e85967 (patch)
treef3741fbf902d936452fdc83954b4f8a19b06be31 /src/login/logind.c
parent6d97d3c648e590fe05a5fd12d06e0ddb9dc9da2f (diff)
logind: enforce a limit on inhibitors we hand out
For similar reasons as the recent addition of a limit on sessions. Note that we don't enforce a limit on inhibitors per-user currently, but there's an implicit one, since each inhibitor takes up one fd, and fds are limited via RLIMIT_NOFILE, and the limit on the number of processes per user.
Diffstat (limited to 'src/login/logind.c')
-rw-r--r--src/login/logind.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/login/logind.c b/src/login/logind.c
index 64bd1ca582..1cbc8f9fcc 100644
--- a/src/login/logind.c
+++ b/src/login/logind.c
@@ -64,6 +64,7 @@ static void manager_reset_config(Manager *m) {
m->runtime_dir_size = PAGE_ALIGN((size_t) (physical_memory() / 10)); /* 10% */
m->user_tasks_max = UINT64_C(12288);
m->sessions_max = UINT64_C(8192);
+ m->inhibitors_max = UINT64_C(8192);
m->kill_user_processes = KILL_USER_PROCESSES;