SHA256
1
0
forked from pool/xauth

- Update to version 1.0.8

* Fix a long standing problem that for ssh tunneled connections a
    display variable of the form: localhost:<N>.<M> leads to correct
    authorization when an X client is started but "xauth list $DISPLAY"
    returns nothing.
  * Fix for: If using GDM with XDMCP, then ssh is not able to start X11
    clients on the remote side. You get a "No xauth data; using fake
    authentication data for X11 forwarding." from SSH.
- obsoletes xauth-1.0.2.diff, 
  u_xauth_Look-for-FamilyLocal-if-inet-or-inet6-addr.patch
- adjusted xauth-tolerant-hostname-changes.diff
- added new test_xauth tool to %files section

OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/xauth?expand=0&rev=4
This commit is contained in:
Stefan Dirsch 2013-10-27 09:10:01 +00:00 committed by Git OBS Bridge
parent 8e42d143fb
commit e98de749e7
7 changed files with 71 additions and 110 deletions

View File

@ -1,62 +0,0 @@
--- gethost.c.orig 2010-09-04 01:04:27.000000000 +0200
+++ gethost.c 2012-01-10 17:57:22.072108000 +0100
@@ -318,16 +318,36 @@ struct addrlist *get_address_info (
for (ai = firstai; ai != NULL; ai = ai->ai_next) {
struct addrlist *duplicate;
+ len = 0;
if (ai->ai_family == AF_INET) {
struct sockaddr_in *sin = (struct sockaddr_in *)ai->ai_addr;
src = &(sin->sin_addr);
- len = sizeof(sin->sin_addr);
- family = FamilyInternet;
+ if (*(in_addr_t *) src == htonl(INADDR_LOOPBACK)) {
+ family = FamilyLocal;
+ if(get_local_hostname (buf, sizeof buf, localhostname)) {
+ src = buf;
+ len = strlen (buf);
+ } else
+ src = NULL;
+ } else {
+ len = sizeof(sin->sin_addr);
+ family = FamilyInternet;
+ }
} else if (ai->ai_family == AF_INET6) {
struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *)ai->ai_addr;
src = &(sin6->sin6_addr);
- len = sizeof(sin6->sin6_addr);
- family = FamilyInternet6;
+ if (IN6_IS_ADDR_V4MAPPED((struct sockaddr_in6 *)src)
+ || IN6_IS_ADDR_LOOPBACK((struct sockaddr_in6 *)src)) {
+ family = FamilyLocal;
+ if (get_local_hostname (buf, sizeof buf, localhostname)) {
+ src = buf;
+ len = strlen (buf);
+ } else
+ src = NULL;
+ } else {
+ len = sizeof(sin6->sin6_addr);
+ family = FamilyInternet6;
+ }
}
for(duplicate = retval; duplicate != NULL; duplicate = duplicate->next) {
@@ -366,7 +386,17 @@ struct addrlist *get_address_info (
#else
if (!get_inet_address (host, &hostinetaddr)) return NULL;
src = (char *) &hostinetaddr;
- len = 4; /* sizeof inaddr.sin_addr, would fail on Cray */
+ if (*(in_addr_t *) src == htonl(INADDR_LOOPBACK)) {
+ family = FamilyLocal;
+ if (get_local_hostname (buf, sizeof buf)) {
+ src = buf;
+ len = strlen (buf);
+ } else {
+ len = 0;
+ src = NULL;
+ }
+ } else
+ len = 4; /* sizeof inaddr.sin_addr, would fail on Cray */
break;
#endif /* IPv6 */
#else

View File

@ -1,17 +0,0 @@
Index: process.c
===================================================================
--- process.c.orig
+++ process.c
@@ -1296,8 +1296,11 @@ remove_entry(char *inputfilename, int li
/*
* unlink the auth we were asked to
*/
- while (!eq_auth((list = *listp)->auth, auth))
+ while (!eq_auth((list = *listp)->auth, auth)) {
listp = &list->next;
+ if (!*listp)
+ return 0;
+ }
*listp = list->next;
XauDisposeAuth (list->auth); /* free the auth */
free (list); /* free the link */

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:84f78c08ebc6687e2e36c9ff1f5610988c6a03fc5bf51ef89aec4d155de3028d
size 139436

3
xauth-1.0.8.tar.bz2 Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:a8696ae7a50c699d5fb3a41408b60d98843d19ea46e9f09e391cb98c8f7fd4f7
size 146794

View File

@ -1,8 +1,8 @@
Index: xauth-1.0.7/gethost.c
Index: xauth-1.0.8/gethost.c
===================================================================
--- xauth-1.0.7.orig/gethost.c
+++ xauth-1.0.7/gethost.c
@@ -201,7 +201,8 @@ struct addrlist *get_address_info (
--- xauth-1.0.8.orig/gethost.c
+++ xauth-1.0.8/gethost.c
@@ -156,7 +156,8 @@ struct addrlist *get_address_info (
int family,
const char *fulldpyname,
int prefix,
@ -12,7 +12,7 @@ Index: xauth-1.0.7/gethost.c
{
struct addrlist *retval = NULL;
int len = 0;
@@ -231,7 +232,7 @@ struct addrlist *get_address_info (
@@ -183,7 +184,7 @@ struct addrlist *get_address_info (
if (prefix == 0 && (strncmp (fulldpyname, "unix:", 5) == 0 ||
fulldpyname[0] == ':')) {
@ -21,10 +21,37 @@ Index: xauth-1.0.7/gethost.c
len = 0;
} else {
src = buf;
Index: xauth-1.0.7/parsedpy.c
@@ -233,7 +234,7 @@ struct addrlist *get_address_info (
src = &(sin->sin_addr);
if (*(const in_addr_t *) src == htonl(INADDR_LOOPBACK)) {
family = FamilyLocal;
- if (get_local_hostname (buf, sizeof buf)) {
+ if (get_local_hostname (buf, sizeof buf, localhostname)) {
src = buf;
len = strlen (buf);
} else
@@ -248,7 +249,7 @@ struct addrlist *get_address_info (
if (!IN6_IS_ADDR_V4MAPPED((const struct in6_addr *)src)) {
if (IN6_IS_ADDR_LOOPBACK((const struct in6_addr *)src)) {
family = FamilyLocal;
- if (get_local_hostname (buf, sizeof buf)) {
+ if (get_local_hostname (buf, sizeof buf, localhostname)) {
src = buf;
len = strlen (buf);
} else
@@ -303,7 +304,7 @@ struct addrlist *get_address_info (
src = (char *) &hostinetaddr;
if (*(const in_addr_t *) src == htonl(INADDR_LOOPBACK)) {
family = FamilyLocal;
- if (get_local_hostname (buf, sizeof buf)) {
+ if (get_local_hostname (buf, sizeof buf, localhostname)) {
src = buf;
len = strlen (buf);
} else {
Index: xauth-1.0.8/parsedpy.c
===================================================================
--- xauth-1.0.7.orig/parsedpy.c
+++ xauth-1.0.7/parsedpy.c
--- xauth-1.0.8.orig/parsedpy.c
+++ xauth-1.0.8/parsedpy.c
@@ -70,20 +70,23 @@ copystring (const char *src, int len)
@ -69,11 +96,11 @@ Index: xauth-1.0.7/parsedpy.c
family = FamilyInternet;
}
#endif
Index: xauth-1.0.7/process.c
Index: xauth-1.0.8/process.c
===================================================================
--- xauth-1.0.7.orig/process.c
+++ xauth-1.0.7/process.c
@@ -463,7 +463,7 @@ read_auth_entries(FILE *fp, Bool numeric
--- xauth-1.0.8.orig/process.c
+++ xauth-1.0.8/process.c
@@ -470,7 +470,7 @@ read_auth_entries(FILE *fp, Bool numeric
}
static Bool
@ -82,7 +109,7 @@ Index: xauth-1.0.7/process.c
{
int family;
char *host = NULL, *rest = NULL;
@@ -483,11 +483,13 @@ get_displayname_auth(const char *display
@@ -490,11 +490,13 @@ get_displayname_auth(const char *display
prelen = (cp - displayname);
if (!parse_displayname (displayname + ((prelen > 0) ? prelen + 1 : 0),
@ -97,7 +124,7 @@ Index: xauth-1.0.7/process.c
if (addrlist_head) {
char buf[40]; /* want to hold largest display num */
unsigned short dpylen;
@@ -1217,13 +1219,18 @@ iterdpy (const char *inputfilename, int
@@ -1240,13 +1242,18 @@ iterdpy (const char *inputfilename, int
Xauth *tmp_auth;
AuthList *proto_head, *proto;
AuthList *l, *next;
@ -118,7 +145,7 @@ Index: xauth-1.0.7/process.c
prefix (inputfilename, lineno);
baddisplayname (displayname, argv[0]);
errors++;
@@ -1567,7 +1574,7 @@ do_add(const char *inputfilename, int li
@@ -1601,7 +1608,7 @@ do_add(const char *inputfilename, int li
}
}
@ -127,10 +154,10 @@ Index: xauth-1.0.7/process.c
prefix (inputfilename, lineno);
baddisplayname (dpyname, argv[0]);
free (key);
Index: xauth-1.0.7/xauth.h
Index: xauth-1.0.8/xauth.h
===================================================================
--- xauth-1.0.7.orig/xauth.h
+++ xauth-1.0.7/xauth.h
--- xauth-1.0.8.orig/xauth.h
+++ xauth-1.0.8/xauth.h
@@ -48,10 +48,10 @@ struct addrlist {
};

View File

@ -1,3 +1,19 @@
-------------------------------------------------------------------
Fri Oct 25 14:48:02 UTC 2013 - sndirsch@suse.com
- Update to version 1.0.8
* Fix a long standing problem that for ssh tunneled connections a
display variable of the form: localhost:<N>.<M> leads to correct
authorization when an X client is started but "xauth list $DISPLAY"
returns nothing.
* Fix for: If using GDM with XDMCP, then ssh is not able to start X11
clients on the remote side. You get a "No xauth data; using fake
authentication data for X11 forwarding." from SSH.
- obsoletes xauth-1.0.2.diff,
u_xauth_Look-for-FamilyLocal-if-inet-or-inet6-addr.patch
- adjusted xauth-tolerant-hostname-changes.diff
- added new test_xauth tool to %files section
-------------------------------------------------------------------
Sat Apr 14 21:47:40 UTC 2012 - dimstar@opensuse.org

View File

@ -1,7 +1,7 @@
#
# spec file for package xauth
#
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -15,18 +15,16 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: xauth
Version: 1.0.7
Release: 1
License: MIT
Version: 1.0.8
Release: 0
Summary: Utility to edit and display the X authorization information
Url: http://xorg.freedesktop.org/
License: MIT
Group: System/X11/Utilities
Url: http://xorg.freedesktop.org/
Source0: http://xorg.freedesktop.org/releases/individual/app/%{name}-%{version}.tar.bz2
# PATCH-FIX-UPSTREAM xauth-1.0.2.diff fdo#48642 -- Fix crash on removing non-existant entry
Patch0: xauth-1.0.2.diff
Patch1: xauth-tolerant-hostname-changes.diff
Patch2: u_xauth_Look-for-FamilyLocal-if-inet-or-inet6-addr.patch
BuildRequires: pkg-config
BuildRequires: pkgconfig(x11)
BuildRequires: pkgconfig(xau)
@ -44,9 +42,7 @@ information used in connecting to the X server.
%prep
%setup -q
%patch0 -p0
%patch1 -p1
%patch2 -p0
%build
%configure
@ -59,6 +55,7 @@ make %{?_smp_mflags}
%defattr(-,root,root)
%doc ChangeLog COPYING README
%{_bindir}/xauth
%{_bindir}/test_xauth
%{_mandir}/man1/xauth.1%{?ext_man}
%changelog