mirror of https://github.com/i3/i3lock.git
Merge pull request #125 from jasperla/mlock
Restore intended behaviour and don't use mlock(2) on OpenBSD.pull/63/merge
commit
7cf393fb7e
6
i3lock.c
6
i3lock.c
|
@ -919,12 +919,12 @@ int main(int argc, char *argv[]) {
|
||||||
errx(EXIT_FAILURE, "PAM: %s", pam_strerror(pam_handle, ret));
|
errx(EXIT_FAILURE, "PAM: %s", pam_strerror(pam_handle, ret));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Using mlock() as non-super-user seems only possible in Linux and OpenBSD.
|
/* Using mlock() as non-super-user seems only possible in Linux.
|
||||||
* Users of other operating systems should use encrypted swap/no swap
|
* Users of other operating systems should use encrypted swap/no swap
|
||||||
* (or remove the ifdef and run i3lock as super-user).
|
* (or remove the ifdef and run i3lock as super-user).
|
||||||
* NB: Alas, swap is encrypted by default on OpenBSD so swapping out
|
* Alas, swap is encrypted by default on OpenBSD so swapping out
|
||||||
* is not necessarily an issue. */
|
* is not necessarily an issue. */
|
||||||
#if defined(__linux__) || defined(__OpenBSD__)
|
#if defined(__linux__)
|
||||||
/* Lock the area where we store the password in memory, we don’t want it to
|
/* Lock the area where we store the password in memory, we don’t want it to
|
||||||
* be swapped to disk. Since Linux 2.6.9, this does not require any
|
* be swapped to disk. Since Linux 2.6.9, this does not require any
|
||||||
* privileges, just enough bytes in the RLIMIT_MEMLOCK limit. */
|
* privileges, just enough bytes in the RLIMIT_MEMLOCK limit. */
|
||||||
|
|
Loading…
Reference in New Issue