Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 316625 Details for
Bug 456157
Xorg does not work with abstract Unix sockets
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
attempt to fix abstract sockets
libxcb-1.1-fix-abstract-sockets.patch (text/plain), 1.46 KB, created by
Sami Farin
on 2008-09-12 21:25:32 UTC
(
hide
)
Description:
attempt to fix abstract sockets
Filename:
MIME Type:
Creator:
Sami Farin
Created:
2008-09-12 21:25:32 UTC
Size:
1.46 KB
patch
obsolete
>--- libxcb-1.1/src/xcb_util.c.bak 2008-07-21 18:39:53.458345567 +0300 >+++ libxcb-1.1/src/xcb_util.c 2008-09-12 20:18:28.304599157 +0300 >@@ -40,6 +40,7 @@ > #include <stdlib.h> > #include <unistd.h> > #include <string.h> >+#include <stddef.h> > > #include "xcb.h" > #include "xcbext.h" >@@ -244,24 +245,32 @@ static int _xcb_open_tcp(char *host, cha > static int _xcb_open_unix(char *protocol, const char *file) > { > int fd; >- struct sockaddr_un addr = { AF_UNIX }; >+ struct sockaddr_un addr; >+ int namelen; > > if (protocol && strcmp("unix",protocol)) > return -1; > >- memset(&addr, 0, sizeof(addr)); >- addr.sun_family = AF_UNIX; >- > fd = socket(AF_UNIX, SOCK_STREAM, 0); > if(fd == -1) > return -1; > >+ memset(&addr, 0, sizeof(addr)); >+ addr.sun_family = AF_UNIX; >+ strncpy(addr.sun_path + 1, file, sizeof(addr.sun_path) - 1); >+#if HAVE_SOCKADDR_SUN_LEN >+ addr.sun_len = SUN_LEN(&addr); >+ namelen = sizeof(addr); >+#else >+ namelen = offsetof(struct sockaddr_un, sun_path) + 1 + >+ strlen(&addr.sun_path[1]); >+#endif >+ > /* try the abstract socket first */ >- strcpy(addr.sun_path + 1, file); >- if(connect(fd, (struct sockaddr *) &addr, sizeof(addr)) != -1) >+ if(connect(fd, (struct sockaddr *) &addr, namelen) != -1) > return fd; > >- strcpy(addr.sun_path, file); >+ strncpy(addr.sun_path, file, sizeof(addr.sun_path)); > if(connect(fd, (struct sockaddr *) &addr, sizeof(addr)) == -1) > return -1; >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 456157
: 316625 |
316668