forked from pool/xauth
Accepting request 113634 from home:dimstar:branches:X11:XOrg
Update to 1.0.7 OBS-URL: https://build.opensuse.org/request/show/113634 OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/xauth?expand=0&rev=2
This commit is contained in:
parent
12a0495e4f
commit
ff982f9375
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:6d139500ff1daf806525adf071f8c1778ad138a0378c73ea831ad18847ad746c
|
||||
size 129568
|
3
xauth-1.0.7.tar.bz2
Normal file
3
xauth-1.0.7.tar.bz2
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:84f78c08ebc6687e2e36c9ff1f5610988c6a03fc5bf51ef89aec4d155de3028d
|
||||
size 139436
|
@ -1,10 +1,10 @@
|
||||
Index: xauth-1.0.5/gethost.c
|
||||
Index: xauth-1.0.7/gethost.c
|
||||
===================================================================
|
||||
--- xauth-1.0.5.orig/gethost.c
|
||||
+++ xauth-1.0.5/gethost.c
|
||||
@@ -244,7 +244,8 @@ struct addrlist *get_address_info (
|
||||
--- xauth-1.0.7.orig/gethost.c
|
||||
+++ xauth-1.0.7/gethost.c
|
||||
@@ -201,7 +201,8 @@ struct addrlist *get_address_info (
|
||||
int family,
|
||||
char *fulldpyname,
|
||||
const char *fulldpyname,
|
||||
int prefix,
|
||||
- char *host)
|
||||
+ char *host,
|
||||
@ -12,7 +12,7 @@ Index: xauth-1.0.5/gethost.c
|
||||
{
|
||||
struct addrlist *retval = NULL;
|
||||
int len = 0;
|
||||
@@ -274,7 +275,7 @@ struct addrlist *get_address_info (
|
||||
@@ -231,7 +232,7 @@ struct addrlist *get_address_info (
|
||||
if (prefix == 0 && (strncmp (fulldpyname, "unix:", 5) == 0 ||
|
||||
fulldpyname[0] == ':')) {
|
||||
|
||||
@ -21,11 +21,11 @@ Index: xauth-1.0.5/gethost.c
|
||||
len = 0;
|
||||
} else {
|
||||
src = buf;
|
||||
Index: xauth-1.0.5/parsedpy.c
|
||||
Index: xauth-1.0.7/parsedpy.c
|
||||
===================================================================
|
||||
--- xauth-1.0.5.orig/parsedpy.c
|
||||
+++ xauth-1.0.5/parsedpy.c
|
||||
@@ -74,20 +74,24 @@ copystring (char *src, int len)
|
||||
--- xauth-1.0.7.orig/parsedpy.c
|
||||
+++ xauth-1.0.7/parsedpy.c
|
||||
@@ -70,20 +70,23 @@ copystring (const char *src, int len)
|
||||
|
||||
|
||||
char *
|
||||
@ -34,10 +34,9 @@ Index: xauth-1.0.5/parsedpy.c
|
||||
{
|
||||
buf[0] = '\0';
|
||||
+ if (localhostname)
|
||||
+ strncpy(buf, localhostname, maxlen);
|
||||
+ strncpy(buf, localhostname, maxlen);
|
||||
+ else
|
||||
(void) XmuGetHostname (buf, maxlen);
|
||||
+
|
||||
return (buf[0] ? buf : NULL);
|
||||
}
|
||||
|
||||
@ -48,20 +47,20 @@ Index: xauth-1.0.5/parsedpy.c
|
||||
{
|
||||
char buf[256];
|
||||
|
||||
- return (get_local_hostname (buf, sizeof buf) ?
|
||||
+ return (get_local_hostname (buf, sizeof buf, localhostname) ?
|
||||
- return (get_local_hostname (buf, sizeof buf) ?
|
||||
+ return (get_local_hostname (buf, sizeof buf, localhostname) ?
|
||||
copystring (buf, strlen (buf)) : NULL);
|
||||
}
|
||||
#endif
|
||||
@@ -97,6 +101,7 @@ copyhostname (void)
|
||||
@@ -93,6 +96,7 @@ copyhostname (void)
|
||||
*/
|
||||
Bool
|
||||
parse_displayname (char *displayname,
|
||||
Bool
|
||||
parse_displayname (const char *displayname,
|
||||
+ char *localhostname,
|
||||
int *familyp, /* return */
|
||||
char **hostp, /* return */
|
||||
int *dpynump, /* return */
|
||||
@@ -138,7 +143,7 @@ parse_displayname (char *displayname,
|
||||
@@ -134,7 +138,7 @@ parse_displayname (const char *displayna
|
||||
host = copystring ("0", 1);
|
||||
family = FamilyDECnet;
|
||||
} else {
|
||||
@ -70,22 +69,22 @@ Index: xauth-1.0.5/parsedpy.c
|
||||
family = FamilyInternet;
|
||||
}
|
||||
#endif
|
||||
Index: xauth-1.0.5/process.c
|
||||
Index: xauth-1.0.7/process.c
|
||||
===================================================================
|
||||
--- xauth-1.0.5.orig/process.c
|
||||
+++ xauth-1.0.5/process.c
|
||||
@@ -466,7 +466,7 @@ read_auth_entries(FILE *fp, Bool numeric
|
||||
--- xauth-1.0.7.orig/process.c
|
||||
+++ xauth-1.0.7/process.c
|
||||
@@ -463,7 +463,7 @@ read_auth_entries(FILE *fp, Bool numeric
|
||||
}
|
||||
|
||||
static Bool
|
||||
-get_displayname_auth(char *displayname, AuthList **authl)
|
||||
+get_displayname_auth(char *displayname, AuthList **authl, char *localhostname)
|
||||
static Bool
|
||||
-get_displayname_auth(const char *displayname, AuthList **authl)
|
||||
+get_displayname_auth(const char *displayname, AuthList **authl, char *localhostname)
|
||||
{
|
||||
int family;
|
||||
char *host = NULL, *rest = NULL;
|
||||
@@ -486,11 +486,13 @@ get_displayname_auth(char *displayname,
|
||||
@@ -483,11 +483,13 @@ get_displayname_auth(const char *display
|
||||
prelen = (cp - displayname);
|
||||
|
||||
|
||||
if (!parse_displayname (displayname + ((prelen > 0) ? prelen + 1 : 0),
|
||||
+ localhostname,
|
||||
&family, &host, &dpynum, &scrnum, &rest)) {
|
||||
@ -98,28 +97,28 @@ Index: xauth-1.0.5/process.c
|
||||
if (addrlist_head) {
|
||||
char buf[40]; /* want to hold largest display num */
|
||||
unsigned short dpylen;
|
||||
@@ -1220,13 +1222,19 @@ iterdpy (char *inputfilename, int lineno
|
||||
@@ -1217,13 +1219,18 @@ iterdpy (const char *inputfilename, int
|
||||
Xauth *tmp_auth;
|
||||
AuthList *proto_head, *proto;
|
||||
AuthList *l, *next;
|
||||
-
|
||||
+ /*
|
||||
+ * get saved local address from environment in case the host
|
||||
+ * name has changed after the credential was added.
|
||||
+ */
|
||||
+ char *xlocalhostname = getenv("XAUTHLOCALHOSTNAME");
|
||||
+
|
||||
|
||||
/*
|
||||
* iterate
|
||||
*/
|
||||
for (i = start; i < argc; i++) {
|
||||
char *displayname = argv[i];
|
||||
const char *displayname = argv[i];
|
||||
- if (!get_displayname_auth (displayname, &proto_head)) {
|
||||
+ if (!get_displayname_auth (displayname, &proto_head, xlocalhostname)) {
|
||||
prefix (inputfilename, lineno);
|
||||
baddisplayname (displayname, argv[0]);
|
||||
errors++;
|
||||
@@ -1569,7 +1577,7 @@ do_add(char *inputfilename, int lineno,
|
||||
@@ -1567,7 +1574,7 @@ do_add(const char *inputfilename, int li
|
||||
}
|
||||
}
|
||||
|
||||
@ -128,21 +127,21 @@ Index: xauth-1.0.5/process.c
|
||||
prefix (inputfilename, lineno);
|
||||
baddisplayname (dpyname, argv[0]);
|
||||
free (key);
|
||||
Index: xauth-1.0.5/xauth.h
|
||||
Index: xauth-1.0.7/xauth.h
|
||||
===================================================================
|
||||
--- xauth-1.0.5.orig/xauth.h
|
||||
+++ xauth-1.0.5/xauth.h
|
||||
@@ -51,10 +51,10 @@ struct addrlist {
|
||||
--- xauth-1.0.7.orig/xauth.h
|
||||
+++ xauth-1.0.7/xauth.h
|
||||
@@ -48,10 +48,10 @@ struct addrlist {
|
||||
};
|
||||
|
||||
extern char *get_hostname ( Xauth *auth );
|
||||
-extern struct addrlist *get_address_info ( int family, char *fulldpyname, int prefix, char *host);
|
||||
+extern struct addrlist *get_address_info ( int family, char *fulldpyname, int prefix, char *host, char *localhostname);
|
||||
extern char *copystring ( char *src, int len );
|
||||
extern const char *get_hostname ( Xauth *auth );
|
||||
-extern struct addrlist *get_address_info ( int family, const char *fulldpyname, int prefix, char *host);
|
||||
+extern struct addrlist *get_address_info ( int family, const char *fulldpyname, int prefix, char *host, char *localhostname);
|
||||
extern char *copystring ( const char *src, int len );
|
||||
-extern char *get_local_hostname ( char *buf, int maxlen );
|
||||
-extern Bool parse_displayname ( char *displayname, int *familyp, char **hostp, int *dpynump, int *scrnump, char **restp );
|
||||
+extern char *get_local_hostname ( char *buf, int maxlen , char *localhostname);
|
||||
+extern Bool parse_displayname ( char *displayname, char *localhostname, int *familyp, char **hostp, int *dpynump, int *scrnump, char **restp );
|
||||
extern int auth_initialize ( char *authfilename );
|
||||
-extern Bool parse_displayname ( const char *displayname, int *familyp, char **hostp, int *dpynump, int *scrnump, char **restp );
|
||||
+extern char *get_local_hostname ( char *buf, int maxlen, char *localhostname );
|
||||
+extern Bool parse_displayname ( const char *displayname, char *localhostname, int *familyp, char **hostp, int *dpynump, int *scrnump, char **restp );
|
||||
extern int auth_initialize ( const char *authfilename );
|
||||
extern int auth_finalize ( void );
|
||||
extern int process_command ( char *inputfilename, int lineno, int argc, char **argv );
|
||||
extern int process_command ( const char *inputfilename, int lineno, int argc, const char **argv );
|
||||
|
@ -1,3 +1,17 @@
|
||||
-------------------------------------------------------------------
|
||||
Sat Apr 14 21:47:40 UTC 2012 - dimstar@opensuse.org
|
||||
|
||||
- Update to version 1.0.7:
|
||||
+ Remove alarm handler in get_hostname
|
||||
+ Add const attributes to fix gcc -Wwrite-strings warnings
|
||||
+ convert strlen/malloc/strcpy combo to strdup
|
||||
- Changes from version 1.0.6:
|
||||
+ auth_finalize: Attempt to rename() if link() fails
|
||||
+ Error out and avoid a call to malloc(0) if given a bad hex
|
||||
string
|
||||
+ Build system fixes.
|
||||
- Rebase xauth-tolerant-hostname-changes.diff.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Apr 13 08:46:08 UTC 2012 - vuntz@opensuse.org
|
||||
|
||||
|
@ -16,8 +16,8 @@
|
||||
#
|
||||
|
||||
Name: xauth
|
||||
Version: 1.0.5
|
||||
Release: 0
|
||||
Version: 1.0.7
|
||||
Release: 1
|
||||
License: MIT
|
||||
Summary: Utility to edit and display the X authorization information
|
||||
Url: http://xorg.freedesktop.org/
|
||||
|
Loading…
x
Reference in New Issue
Block a user