]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
Enforce per-user quota on /tmp/ and /dev/shm/ as user logs in (#36010)
authorLennart Poettering <lennart@poettering.net>
Fri, 24 Jan 2025 11:52:27 +0000 (12:52 +0100)
committerGitHub <noreply@github.com>
Fri, 24 Jan 2025 11:52:27 +0000 (12:52 +0100)
There's finally quota on tmpfs, hence let's use it to make it harder for
users to DoS the system by consuming all disk space in /tmp/ and
/dev/shm/.

This enforces a default limit of 80% quota of the backing fs for these
two dirs for users, but this can be overriden in the user record, if
desired.

This also adds two other interesting features:

1. mount units gain GracefulOptions= which takes optional mount options
that are added only if supported by the kernel. (this is used to enable
usrquota on /tmp/, if available.)
2. The PAM logic in service management now supports reading passwords
from service credentials and via the askpw logic. This used for make
testing easy (so that we can run0 into a homed user which strictly
requires a password).

1  2 
TODO
src/shared/user-record.c

diff --cc TODO
Simple merge
Simple merge