summaryrefslogtreecommitdiff
path: root/src/login/logind.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-03-04 19:20:21 +0100
committerLennart Poettering <lennart@poettering.net>2014-03-04 20:02:50 +0100
commit1c231f56482546725c4dbd3303f70300bd3c63e9 (patch)
treedc0f3ff586db692d961264a23b2b23040c1ce53e /src/login/logind.c
parentb5d742138f71e87312541a89aac5657015f50f48 (diff)
logind: make $XDG_RUNTIME_DIR a per-user tmpfs
This way each user allocates from his own pool, with its own size limit. This puts the size limit by default to 10% of the physical RAM size but makes it configurable in logind.conf.
Diffstat (limited to 'src/login/logind.c')
-rw-r--r--src/login/logind.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/login/logind.c b/src/login/logind.c
index fd113b3e79..03b77539bd 100644
--- a/src/login/logind.c
+++ b/src/login/logind.c
@@ -60,6 +60,8 @@ Manager *manager_new(void) {
m->idle_action = HANDLE_IGNORE;
m->idle_action_not_before_usec = now(CLOCK_MONOTONIC);
+ m->runtime_dir_size = PAGE_ALIGN((size_t) (physical_memory() / 10)); /* 10% */
+
m->devices = hashmap_new(string_hash_func, string_compare_func);
m->seats = hashmap_new(string_hash_func, string_compare_func);
m->sessions = hashmap_new(string_hash_func, string_compare_func);