mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-01-29 21:47:05 +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/kd.h>
|
||||||
#include <linux/vt.h>
|
#include <linux/vt.h>
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
|
#include <stdio_ext.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <sys/ioctl.h>
|
#include <sys/ioctl.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
@ -175,9 +176,8 @@ int session_save(Session *s) {
|
|||||||
if (r < 0)
|
if (r < 0)
|
||||||
goto fail;
|
goto fail;
|
||||||
|
|
||||||
assert(s->user);
|
(void) __fsetlocking(f, FSETLOCKING_BYCALLER);
|
||||||
|
(void) fchmod(fileno(f), 0644);
|
||||||
fchmod(fileno(f), 0644);
|
|
||||||
|
|
||||||
fprintf(f,
|
fprintf(f,
|
||||||
"# This is private data. Do not parse.\n"
|
"# This is private data. Do not parse.\n"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user