cryptenroll,cryptsetup,shutdown: only call mlockall if we have CAP_IPC_LOCK
Calling mlockall in an unprivileged process most notably had the effect of making systemd-cryptenroll OOM while trying to open a normal-sized argon2 keyslot due to it hitting RLIMIT_MEMLOCK.
This commit is contained in:
@@ -257,5 +257,7 @@ int proc_dir_open(DIR **ret);
|
||||
int proc_dir_read(DIR *d, pid_t *ret);
|
||||
int proc_dir_read_pidref(DIR *d, PidRef *ret);
|
||||
|
||||
int safe_mlockall(int flags);
|
||||
|
||||
_noreturn_ void report_errno_and_exit(int errno_fd, int error);
|
||||
int read_errno(int errno_fd);
|
||||
|
||||
Reference in New Issue
Block a user