Hello community,
here is the log from the commit of package libxcb for openSUSE:Factory checked in at 2016-01-30 11:34:30
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libxcb (Old)
and /work/SRC/openSUSE:Factory/.libxcb.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libxcb"
Changes:
--------
--- /work/SRC/openSUSE:Factory/libxcb/libxcb.changes 2015-09-11 09:02:40.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.libxcb.new/libxcb.changes 2016-01-30 11:34:31.000000000 +0100
@@ -1,0 +2,7 @@
+Wed Dec 23 23:16:43 UTC 2015 - eich@suse.com
+
+- n_If-auth-with-credentials-for-hostname-fails-retry-with-XAUTHLOCALHOSTNAME.patch:
+ If auth with credentials for hostname fails retry with XAUTHLOCALHOSTNAME
+ (boo#906622).
+
+-------------------------------------------------------------------
New:
----
n_If-auth-with-credentials-for-hostname-fails-retry-with-XAUTHLOCALHOSTNAME.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ libxcb.spec ++++++
--- /var/tmp/diff_new_pack.qhJXIc/_old 2016-01-30 11:34:32.000000000 +0100
+++ /var/tmp/diff_new_pack.qhJXIc/_new 2016-01-30 11:34:32.000000000 +0100
@@ -1,7 +1,7 @@
#
# spec file for package libxcb
#
-# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -31,7 +31,7 @@
Source: %{name}-%{version}.tar.bz2
Source1: baselibs.conf
Patch1: bug-262309_xcb-xauthlocalhostname.diff
-
+Patch2: n_If-auth-with-credentials-for-hostname-fails-retry-with-XAUTHLOCALHOSTNAME.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: autoconf >= 2.57
BuildRequires: automake
@@ -401,6 +401,7 @@
%prep
%setup -q
%patch -P 1 -p0
+%patch2 -p1
%build
./autogen.sh
++++++ n_If-auth-with-credentials-for-hostname-fails-retry-with-XAUTHLOCALHOSTNAME.patch ++++++
From: Egbert Eich
Date: Thu Dec 24 00:11:43 2015 +0100
Subject: [PATCH]If auth with credentials for hostname fails retry with XAUTHLOCALHOSTNAME
Patch-mainline: never
References: boo#906622
Signed-off-by: Egbert Eich
Signed-off-by: Egbert Eich
---
src/xcb_auth.c | 26 ++++++++++++++++++--------
1 file changed, 18 insertions(+), 8 deletions(-)
diff --git a/src/xcb_auth.c b/src/xcb_auth.c
index 6eb6528..777c772 100644
--- a/src/xcb_auth.c
+++ b/src/xcb_auth.c
@@ -109,7 +109,7 @@ static int authname_match(enum auth_protos kind, char *name, size_t namelen)
#define SIN6_ADDR(s) (&((struct sockaddr_in6 *)s)->sin6_addr)
-static Xauth *get_authptr(struct sockaddr *sockname, int display)
+static Xauth *get_authptr(struct sockaddr *sockname, int display, int *stage)
{
char *addr = 0;
int addrlen = 0;
@@ -119,6 +119,8 @@ static Xauth *get_authptr(struct sockaddr *sockname, int display)
int dispbuflen;
Xauth *authptr = NULL;
+ if (*stage == 2)
+ return NULL;
family = FamilyLocal; /* 256 */
switch(sockname->sa_family)
{
@@ -161,10 +163,13 @@ static Xauth *get_authptr(struct sockaddr *sockname, int display)
addrlen = strlen(addr);
}
- authptr = XauGetBestAuthByAddr (family,
- (unsigned short) addrlen, addr,
- (unsigned short) dispbuflen, dispbuf,
- N_AUTH_PROTOS, authnames, authnameslen);
+ if (*stage == 0) {
+ authptr = XauGetBestAuthByAddr (family,
+ (unsigned short) addrlen, addr,
+ (unsigned short) dispbuflen, dispbuf,
+ N_AUTH_PROTOS, authnames, authnameslen);
+ *stage = 1;
+ }
// && !phostname
if ((!authptr || !authptr->data_length) && family == FamilyLocal) {
if ( (addr = getenv("XAUTHLOCALHOSTNAME")) ) {
@@ -172,6 +177,7 @@ static Xauth *get_authptr(struct sockaddr *sockname, int display)
(unsigned short) strlen(addr), addr,
(unsigned short) dispbuflen, dispbuf,
N_AUTH_PROTOS, authnames, authnameslen);
+ *stage = 2;
}
}
return authptr;
@@ -328,6 +334,7 @@ int _xcb_get_auth_info(int fd, xcb_auth_info_t *info, int display)
int gotsockname = 0;
Xauth *authptr = 0;
int ret = 1;
+ int stage = 0;
/* Some systems like hpux or Hurd do not expose peer names
* for UNIX Domain Sockets, but this is irrelevant,
@@ -344,8 +351,8 @@ int _xcb_get_auth_info(int fd, xcb_auth_info_t *info, int display)
}
gotsockname = 1;
}
-
- authptr = get_authptr(sockname, display);
+retry:
+ authptr = get_authptr(sockname, display, &stage);
if (authptr == 0)
{
free(sockname);
@@ -371,7 +378,10 @@ int _xcb_get_auth_info(int fd, xcb_auth_info_t *info, int display)
if(!ret)
{
free(info->name);
- goto no_auth; /* cannot build auth record */
+ info->name = 0;
+ info->namelen = 0;
+ XauDisposeAuth(authptr);
+ goto retry; /* cannot build auth record */
}
free(sockname);