diff options
author | sinirajapan <87935975+sinirajapan@users.noreply.github.com> | 2021-07-29 21:58:41 +0900 |
---|---|---|
committer | Robert Ancell <robert.ancell@gmail.com> | 2022-04-26 09:46:48 +1200 |
commit | 42dc9dc5865d26ba37ca3c07d3a97d4de03b7909 (patch) | |
tree | e7bb5ce21f3f8db00938c9e19b4c2d8e4d8a2f31 | |
parent | 653809c387c0a4e4d96f7999db3106d89970d4c7 (diff) | |
download | lightdm-git-42dc9dc5865d26ba37ca3c07d3a97d4de03b7909.tar.gz |
Update x-authority.c
No O_TRUNC causes the xauthority file corruption.
In case the address of XDMCP DISPLAY length differs.
-rw-r--r-- | src/x-authority.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/x-authority.c b/src/x-authority.c index baaf4bea..a04f76a6 100644 --- a/src/x-authority.c +++ b/src/x-authority.c @@ -320,7 +320,7 @@ x_authority_write (XAuthority *auth, XAuthWriteMode mode, const gchar *filename, /* Write records back */ errno = 0; - int output_fd = g_open (filename, O_WRONLY | O_CREAT, S_IRUSR | S_IWUSR); + int output_fd = g_open (filename, O_WRONLY | O_CREAT | O_TRUNC , S_IRUSR | S_IWUSR); if (output_fd < 0) { g_set_error (error, |