diff options
Diffstat (limited to 'x11/gdm/files/patch-daemon_gdm-display-access-file.c')
-rw-r--r-- | x11/gdm/files/patch-daemon_gdm-display-access-file.c | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/x11/gdm/files/patch-daemon_gdm-display-access-file.c b/x11/gdm/files/patch-daemon_gdm-display-access-file.c index 78a78f5096b4..a651d22b2002 100644 --- a/x11/gdm/files/patch-daemon_gdm-display-access-file.c +++ b/x11/gdm/files/patch-daemon_gdm-display-access-file.c @@ -1,19 +1,12 @@ ---- daemon/gdm-display-access-file.c.orig 2022-01-12 14:15:56 UTC +--- daemon/gdm-display-access-file.c.orig 2023-09-14 15:27:04 UTC +++ daemon/gdm-display-access-file.c -@@ -337,9 +337,18 @@ _create_xauth_file_for_user (const char *username, +@@ -337,9 +337,11 @@ _create_xauth_file_for_user (const char *username, g_debug ("GdmDisplayAccessFile: creating %s", auth_filename); /* mode 00600 */ errno = 0; - fd = g_open (auth_filename, - O_RDWR | O_CREAT | O_EXCL | O_BINARY, - S_IRUSR | S_IWUSR); -+#if defined(__OpenBSD__) -+ if (uid == 676) { -+ fd = g_open (auth_filename, -+ O_RDWR | O_CREAT | O_EXCL | O_BINARY, -+ S_IRUSR | S_IWUSR | S_IRGRP); -+ } else -+#endif + { + fd = g_open (auth_filename, + O_RDWR | O_CREAT | O_EXCL | O_BINARY, @@ -22,15 +15,15 @@ if (fd < 0) { g_set_error (error, -@@ -441,9 +450,9 @@ _get_auth_info_for_display (GdmDisplayAccessFile *file +@@ -429,9 +431,9 @@ _get_auth_info_for_display (GdmDisplayAccessFile *file * * https://bugs.freedesktop.org/show_bug.cgi?id=43425 */ - char localhost[HOST_NAME_MAX + 1] = ""; -+ char localhost[256] = ""; ++ char localhost[_POSIX_HOST_NAME_MAX + 1] = ""; *family = FamilyLocal; - if (gethostname (localhost, HOST_NAME_MAX) == 0) { -+ if (gethostname (localhost, 255) == 0) { ++ if (gethostname (localhost, _POSIX_HOST_NAME_MAX) == 0) { *address = g_strdup (localhost); } else { *address = g_strdup ("localhost"); |