- improved the x11 patch (#598671)

This commit is contained in:
Jan F. Chadima 2010-06-25 12:08:42 +00:00
parent 41a56c5d4d
commit a3dee6b29d
2 changed files with 26 additions and 14 deletions

View File

@ -1,12 +1,21 @@
diff -up openssh-5.5p1/pathnames.h.x11 openssh-5.5p1/pathnames.h diff -up openssh-5.5p1/channels.c.x11 openssh-5.5p1/channels.c
--- openssh-5.5p1/pathnames.h.x11 2010-06-23 18:07:59.000000000 +0200 --- openssh-5.5p1/channels.c.x11 2010-06-25 13:35:44.000000000 +0200
+++ openssh-5.5p1/pathnames.h 2010-06-23 18:10:20.000000000 +0200 +++ openssh-5.5p1/channels.c 2010-06-25 13:40:40.000000000 +0200
@@ -137,7 +137,7 @@ @@ -3354,7 +3354,17 @@ static int
connect_local_xsocket(u_int dnr)
{
char buf[1024];
+#ifdef linux
+ int ret;
+#endif
snprintf(buf, sizeof buf, _PATH_UNIX_X, dnr);
+#ifdef linux
+ /* try abstract socket first */
+ buf[0] = '\0';
+ if ((ret = connect_local_xsocket_path(buf)) >= 0)
+ return ret;
+ buf[0] = '/';
+#endif
return connect_local_xsocket_path(buf);
}
/* UNIX domain socket for X11 server; displaynum will replace %u */
#ifndef _PATH_UNIX_X
-#define _PATH_UNIX_X "/tmp/.X11-unix/X%u"
+#define _PATH_UNIX_X "/var/spool/sockets/X11/%u"
#endif
/* for scp */

View File

@ -70,7 +70,7 @@
%endif %endif
# Do not forget to bump pam_ssh_agent_auth release if you rewind the main package release to 1 # Do not forget to bump pam_ssh_agent_auth release if you rewind the main package release to 1
%define openssh_rel 15 %define openssh_rel 16
%define openssh_ver 5.5p1 %define openssh_ver 5.5p1
%define pam_ssh_agent_rel 26 %define pam_ssh_agent_rel 26
%define pam_ssh_agent_ver 0.9.2 %define pam_ssh_agent_ver 0.9.2
@ -94,7 +94,6 @@ Source4: http://prdownloads.sourceforge.net/pamsshagentauth/pam_ssh_agent_auth/p
Source5: pam_ssh_agent-rmheaders Source5: pam_ssh_agent-rmheaders
Patch0: openssh-5.4p1-redhat.patch Patch0: openssh-5.4p1-redhat.patch
Patch1: openssh-5.5p1-x11.patch
#https://bugzilla.mindrot.org/show_bug.cgi?id=1638 #https://bugzilla.mindrot.org/show_bug.cgi?id=1638
Patch2: openssh-5.3p1-skip-initial.patch Patch2: openssh-5.3p1-skip-initial.patch
#https://bugzilla.mindrot.org/show_bug.cgi?id=1640 #https://bugzilla.mindrot.org/show_bug.cgi?id=1640
@ -132,6 +131,7 @@ Patch76: openssh-5.5p1-staterr.patch
#https://bugzilla.mindrot.org/show_bug.cgi?id=1750 #https://bugzilla.mindrot.org/show_bug.cgi?id=1750
Patch77: openssh-5.5p1-stderr.patch Patch77: openssh-5.5p1-stderr.patch
Patch78: openssh-5.5p1-kuserok.patch Patch78: openssh-5.5p1-kuserok.patch
Patch79: openssh-5.5p1-x11.patch
License: BSD License: BSD
Group: Applications/Internet Group: Applications/Internet
@ -267,7 +267,6 @@ The module is most useful for su and sudo service stacks.
%prep %prep
%setup -q -a 4 %setup -q -a 4
%patch0 -p1 -b .redhat %patch0 -p1 -b .redhat
%patch1 -p1 -b .x11
%patch2 -p1 -b .skip-initial %patch2 -p1 -b .skip-initial
%patch4 -p1 -b .vendor %patch4 -p1 -b .vendor
@ -305,6 +304,7 @@ popd
%patch76 -p1 -b .staterr %patch76 -p1 -b .staterr
%patch77 -p1 -b .stderr %patch77 -p1 -b .stderr
%patch78 -p1 -b .kuserok %patch78 -p1 -b .kuserok
%patch79 -p1 -b .x11
autoreconf autoreconf
pushd pam_ssh_agent_auth-%{pam_ssh_agent_ver} pushd pam_ssh_agent_auth-%{pam_ssh_agent_ver}
@ -586,6 +586,9 @@ fi
%endif %endif
%changelog %changelog
* Thu Jun 25 2010 Jan F. Chadima <jchadima@redhat.com> - 5.5p1-16 + 0.9.2-26
- improved the x11 patch (#598671)
* Thu Jun 24 2010 Jan F. Chadima <jchadima@redhat.com> - 5.5p1-15 + 0.9.2-26 * Thu Jun 24 2010 Jan F. Chadima <jchadima@redhat.com> - 5.5p1-15 + 0.9.2-26
- changed _PATH_UNIX_X to unexistent file name (#598671) - changed _PATH_UNIX_X to unexistent file name (#598671)