mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-01-27 14:03:43 +03:00
logind: turn of stdio locking when writing session files too
This just copies what we already do for user and seat files to session files.
This commit is contained in:
parent
1c8280fd47
commit
4417640013
@ -5,6 +5,7 @@
|
||||
#include <linux/kd.h>
|
||||
#include <linux/vt.h>
|
||||
#include <signal.h>
|
||||
#include <stdio_ext.h>
|
||||
#include <string.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <unistd.h>
|
||||
@ -175,9 +176,8 @@ int session_save(Session *s) {
|
||||
if (r < 0)
|
||||
goto fail;
|
||||
|
||||
assert(s->user);
|
||||
|
||||
fchmod(fileno(f), 0644);
|
||||
(void) __fsetlocking(f, FSETLOCKING_BYCALLER);
|
||||
(void) fchmod(fileno(f), 0644);
|
||||
|
||||
fprintf(f,
|
||||
"# This is private data. Do not parse.\n"
|
||||
|
Loading…
x
Reference in New Issue
Block a user