Hello community, here is the log from the commit of package xorg-x11 for openSUSE:Factory checked in at Tue Apr 13 21:10:47 CEST 2010. -------- --- xorg-x11/xorg-x11.changes 2010-04-07 14:41:37.000000000 +0200 +++ /mounts/work_src_done/STABLE/xorg-x11/xorg-x11.changes 2010-04-11 13:15:17.000000000 +0200 @@ -1,0 +2,26 @@ +Sun Apr 11 12:24:07 CEST 2010 - sndirsch@suse.de + +- specfile cleanup + +------------------------------------------------------------------- +Sun Apr 11 11:48:22 CEST 2010 - sndirsch@suse.de + +- reorganized patches + * 0001-XDM-Add-support-for-clients-that-sent-ipv4-addresses.patch + --> xdm-add-support-for-clients-that-sent-ipv4-addresses.diff + * p_twm_sig11.diff --> twm-sig11.diff + * p_xrdb.diff --> xrdb.diff + * ps_suse.diff --> twm-suse.diff, xinit-suse.diff + * p_xauth.diff --> xauth-tolerant-hostname-changes.diff, + xdm-tolerant-hostname-changes.diff, + xinit-tolerant-hostname-changes.diff +- removed obsolete 'p_bugzilla-117193-luit-sometimes-hangs.diff' + +------------------------------------------------------------------- +Fri Apr 9 19:54:36 CEST 2010 - sndirsch@suse.de + +- configure xrdb with "--with-cpp=/usr/bin/cpp"; otherwise it + apparently gets compiled without cpp support, which breaks e.g. + emacs ('Undefined color: "WINDOW FOREGROUND"') + +------------------------------------------------------------------- calling whatdependson for head-i586 Old: ---- 0001-XDM-Add-support-for-clients-that-sent-ipv4-addresses.patch p_bugzilla-117193-luit-sometimes-hangs.diff p_twm_sig11.diff p_xauth.diff p_xrdb.diff ps_suse.diff New: ---- twm-sig11.diff twm-suse.diff xauth-tolerant-hostname-changes.diff xdm-add-support-for-clients-that-sent-ipv4-addresses.diff xdm-tolerant-hostname-changes.diff xinit-suse.diff xinit-tolerant-hostname-changes.diff xrdb.diff ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ xorg-x11.spec ++++++ --- /var/tmp/diff_new_pack.VeDBFI/_old 2010-04-13 21:09:58.000000000 +0200 +++ /var/tmp/diff_new_pack.VeDBFI/_new 2010-04-13 21:09:58.000000000 +0200 @@ -19,22 +19,14 @@ Name: xorg-x11 -%define mcpp 0 BuildRequires: ConsoleKit-devel fontconfig-devel freetype2-devel libXi6-devel libpng-devel ncurses-devel pam-devel pkgconfig rsh update-desktop-files xorg-x11-devel xorg-x11-libICE-devel xorg-x11-libSM-devel xorg-x11-libX11-devel xorg-x11-libXau-devel xorg-x11-libXdmcp-devel xorg-x11-libXext-devel xorg-x11-libXfixes-devel xorg-x11-libXmu-devel xorg-x11-libXp-devel xorg-x11-libXpm-devel xorg-x11-libXprintUtil-devel xorg-x11-libXrender-devel xorg-x11-libXt-devel xorg-x11-libXv-devel xorg-x11-libfontenc-devel xorg-x11-libxkbfile-devel xorg-x11-proto-devel xorg-x11-xtrans-devel -%if %mcpp -BuildRequires: mcpp -%endif Url: http://xorg.freedesktop.org/ Version: 7.5 -Release: 2 +Release: 3 License: MIT License (or similar) BuildRoot: %{_tmppath}/%{name}-%{version}-build Group: System/X11/Utilities -%if %mcpp -Requires: mcpp -%else Requires: cpp -%endif Requires: %{name}-xauth ConsoleKit Recommends: dbus-1-x11 Provides: XFree86 xcompmgr xrestop @@ -149,11 +141,6 @@ Patch7: xinit.diff Patch8: xsm.diff Patch10: xrx.diff -Patch12: ps_suse.diff -Patch13: p_xauth.diff -Patch14: p_bugzilla-117193-luit-sometimes-hangs.diff -Patch15: p_xrdb.diff -Patch16: p_twm_sig11.diff Patch19: scripts.diff Patch20: xdm.diff Patch21: xvidtune.diff @@ -165,8 +152,15 @@ Patch54: xinit-client-session.patch Patch55: xset-spurious-xprint.patch Patch56: xdm-consolekit.diff -Patch58: 0001-XDM-Add-support-for-clients-that-sent-ipv4-addresses.patch Patch59: xcursorgen-libpng.diff +Patch61: twm-sig11.diff +Patch62: twm-suse.diff +Patch63: xauth-tolerant-hostname-changes.diff +Patch64: xdm-add-support-for-clients-that-sent-ipv4-addresses.diff +Patch65: xdm-tolerant-hostname-changes.diff +Patch66: xinit-suse.diff +Patch67: xinit-tolerant-hostname-changes.diff +Patch68: xrdb.diff %description This package contains the X.Org core and sample applications. @@ -265,18 +259,6 @@ pushd xrx-* %patch10 popd -%patch12 -%patch13 -# seems to be obsolete since luit 1.0.2 -#pushd luit-* -#%patch14 -p3 -#popd -pushd xrdb-* -%patch15 -p2 -popd -pushd twm-*/src -%patch16 -p2 -popd pushd xauth-* %patch24 popd @@ -297,30 +279,40 @@ patch -d xfs-* -p0 -s < %PATCH47 patch -d mkfontscale-* -p1 -s < %PATCH48 patch -d xdm-* -p1 -s < %PATCH56 -patch -d xdm-* -p1 -s < %PATCH58 patch -d xcursorgen-* -p1 -s < %PATCH59 +patch -d twm-* -p1 -s < %PATCH61 +patch -d twm-* -p1 -s < %PATCH62 +patch -d xauth-* -p1 -s < %PATCH63 +patch -d xdm-* -p1 -s < %PATCH64 +patch -d xdm-* -p1 -s < %PATCH65 +patch -d xinit-* -p1 -s < %PATCH66 +patch -d xinit-* -p1 -s < %PATCH67 +patch -d xrdb-* -p2 -s < %PATCH68 %build %install export PATH=${PATH}:$RPM_BUILD_ROOT/usr/bin -for dir in xcursorgen-* xinit-* $(ls | grep -v -e suse \ - -e xcursorgen \ - -e xinit); do +for dir in xcursorgen-* $(ls | grep -v xcursorgen); do pushd $dir - #autoreconf -fi case $dir in - xdm-*) option='--with-pam --with-xdmconfigdir=/etc/X11/xdm --with-xdmscriptdir=/etc/X11/xdm'; autoreconf -fi ;; - xfs-*|lbxproxy-*|proxymngr-*|rstart-*|x11perf-*|xedit-*|xinit-*|xsm|scripts-*|sessreg-*|beforelight-*|xrx-*) - option=''; autoreconf -fi ;; + xdm-*) option='--with-pam --with-xdmconfigdir=/etc/X11/xdm --with-xdmscriptdir=/etc/X11/xdm' + autoreconf -fi ;; + lbxproxy-*| \ + proxymngr-*| \ + rstart-*| \ + scripts-*| \ + x11perf-*| \ + xcursorgen-*| \ + xinit-*| \ + xset-*| \ + xsm) option=''; autoreconf -fi ;; luit-*) option='--with-localealiasfile=/usr/share/X11/locale/locale.alias' ;; - xcursorgen-*) autoreconf -fi; options='' ;; + xrdb-*) option='--with-cpp=/usr/bin/cpp' ;; *) option='' ;; esac - ./configure CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" \ - --sysconfdir=/etc \ - --prefix=/usr --libdir=%{_libdir} \ - --mandir=%{_mandir} ${option} --with-cpp='/usr/bin/cpp -a' + %configure CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" \ + --sysconfdir=/etc ${option} make %{?jobs:-j%jobs}; make install DESTDIR=$RPM_BUILD_ROOT # for some compatibility symlinks @@ -338,18 +330,10 @@ $RPM_BUILD_ROOT/etc/X11/xinit/keygen.c chmod 0711 $RPM_BUILD_ROOT/usr/bin/keygen rm $RPM_BUILD_ROOT/etc/X11/xinit/keygen.c -%if %suse_version <= 1010 - ln -s /usr/bin/startx $RPM_BUILD_ROOT/usr/X11R6/bin/startx -%endif ;; mkcomposecache-*) install -m 0755 mkallcomposecaches.sh $RPM_BUILD_ROOT/usr/sbin/mkallcomposecaches ;; - mkfontdir-*) -%if %suse_version <= 1010 - ln -s /usr/bin/mkfontdir $RPM_BUILD_ROOT/usr/X11R6/bin/mkfontdir -%endif - ;; proxymngr-*) sed -i s+$RPM_BUILD_ROOT++g $RPM_BUILD_ROOT/etc/X11/proxymngr/pmconfig ;; @@ -359,12 +343,6 @@ popd %suse_update_desktop_file $RPM_BUILD_ROOT/usr/share/xsessions/twm.desktop ;; -### bnc #471013 -%if %suse_version <= 1110 - xauth-*) - ln -s /usr/bin/xauth $RPM_BUILD_ROOT/usr/X11R6/bin/xauth - ;; -%endif xcalc-*) %suse_update_desktop_file -i -u xcalc Calculator ;; @@ -377,14 +355,6 @@ # SuSE default XDM configuration pushd $RPM_BUILD_ROOT tar xjf $RPM_SOURCE_DIR/xdm.tar.bz2 -%if %suse_version <= 1100 - echo "session required pam_resmgr.so" >> etc/pam.d/xdm - echo "session required pam_resmgr.so" >> etc/pam.d/xdm-np -%endif -%if %suse_version <= 1010 - rm etc/pam.d/xdm-np - sed -i 's/pam_loginuid.so/pam_devperm.so/g' etc/pam.d/xdm -%endif %ifarch s390 s390x patch -p0 -s < $RPM_SOURCE_DIR/xdm.diff rm -f var/adm/fillup-templates/sysconfig.displaymanager.orig @@ -395,21 +365,9 @@ ln -snf /var/lib/xdm/authdir $RPM_BUILD_ROOT/etc/X11/xdm/authdir # for FHS compliance (Bug #21857) mv $RPM_BUILD_ROOT/usr/%{_lib}/X11/xdm/chooser $RPM_BUILD_ROOT/usr/bin/ -%if %suse_version <= 1010 - mkdir -p $RPM_BUILD_ROOT/sbin/conf.d - ln -snf /etc/X11/xdm/SuSEconfig.xdm \ - $RPM_BUILD_ROOT/sbin/conf.d/SuSEconfig.xdm - ln -s /usr/bin/xdm $RPM_BUILD_ROOT/usr/X11R6/bin/xdm - rm $RPM_BUILD_ROOT/etc/init.d/xdm \ - $RPM_BUILD_ROOT/usr/sbin/rcxdm \ - $RPM_BUILD_ROOT/var/adm/fillup-templates/sysconfig.displaymanager -%endif # Bug 223734 rm $RPM_BUILD_ROOT/usr/%{_lib}/X11/xdm/libXdmGreet.a \ $RPM_BUILD_ROOT/usr/%{_lib}/X11/xdm/libXdmGreet.la -%if %suse_version > 1020 - sed -i 's/earlykdm/earlyxdm/g' $RPM_BUILD_ROOT/etc/init.d/xdm -%endif ;; xfs-*) pushd $RPM_BUILD_ROOT @@ -427,19 +385,9 @@ xmag-*) %suse_update_desktop_file -i -u xmag DesktopUtility ;; - xrdb-*) -%if %suse_version <= 1010 - ln -s /usr/bin/xrdb $RPM_BUILD_ROOT/usr/X11R6/bin/xrdb -%endif - ;; xrefresh-*) %suse_update_desktop_file -i -u Xrefresh DesktopUtility ;; - xset-*) -%if %suse_version <= 1010 - ln -s /usr/bin/xset $RPM_BUILD_ROOT/usr/X11R6/bin/xset -%endif - ;; rstartd-*) # for FHS/FSSTND compliance (bnc #470983) mv $RPM_BUILD_ROOT/etc/X11/rstart/rstartd.real $RPM_BUILD_ROOT/usr/bin/ @@ -461,17 +409,11 @@ %clean rm -rf "$RPM_BUILD_ROOT" -%pre -test -L usr/include/X11 && rm usr/include/X11 -exit 0 - %post # Create symbolic run level links for xfs start script: %{fillup_and_insserv xfs} -%if %suse_version > 1010 %{fillup_and_insserv -Y xdm} %{fillup_only -n displaymanager} -%endif %run_permissions %verifyscript %verify_permissions -e /usr/bin/dga @@ -494,29 +436,15 @@ %endif %config /etc/logrotate.d/xdm %config /etc/pam.d/xdm -%if %suse_version > 1010 %config /etc/pam.d/xdm-np -%endif %config /etc/skel/.xinitrc.template %config /etc/X11/* %config(noreplace) /etc/sysconfig/SuSEfirewall2.d/services/* -%if %suse_version > 1010 /etc/init.d/xdm -%endif /etc/init.d/xfs -%if %suse_version <= 1010 -/sbin/conf.d/SuSEconfig.xdm -/usr/X11R6/bin/mkfontdir -/usr/X11R6/bin/startx -/usr/X11R6/bin/xdm -/usr/X11R6/bin/xrdb -/usr/X11R6/bin/xset -%endif /usr/sbin/mkallcomposecaches /usr/sbin/mkcomposecache -%if %suse_version > 1010 /usr/sbin/rcxdm -%endif /usr/sbin/rcxfs /usr/bin/* %exclude /usr/bin/xauth @@ -531,16 +459,8 @@ %{_mandir}/man1/* %exclude %{_mandir}/man1/xauth.1* %{_mandir}/man8/* -%if %suse_version <= 1020 -/usr/share/pixmaps/xcalc.png -/usr/share/pixmaps/xclipboard.png -/usr/share/pixmaps/xload.png -/usr/share/pixmaps/xmag.png -%endif /usr/share/xsessions/twm.desktop -%if %suse_version > 1010 /var/adm/fillup-templates/sysconfig.displaymanager -%endif %ghost /var/log/xdm.errors %ghost /var/run/xdm.pid /var/lib/xdm/authdir/ @@ -548,9 +468,6 @@ %files xauth %defattr(-,root,root) /usr/bin/xauth -%if %suse_version <= 1110 -/usr/X11R6/bin/xauth -%endif %{_mandir}/man1/xauth.1* %changelog ++++++ twm-sig11.diff ++++++ Index: twm-1.0.4/src/add_window.c =================================================================== --- twm-1.0.4/src.orig/add_window.c +++ twm-1.0.4/src/add_window.c @@ -1538,10 +1538,11 @@ FetchWmColormapWindows (TwmWindow *tmp) cwins = (ColormapWindow **) malloc(sizeof(ColormapWindow *)); if (XFindContext(dpy, tmp->w, ColormapContext, (caddr_t *)&cwins[0]) == - XCNOENT) + XCNOENT) { cwins[0] = CreateColormapWindow(tmp->w, (Bool) tmp->cmaps.number_cwins == 0, False); - else + if (cwins[0] == NULL) number_cmap_windows = 0; + } else cwins[0]->refcnt++; } ++++++ twm-suse.diff ++++++ --- twm-1.0.4/src/system.twmrc.orig +++ twm-1.0.4/src/system.twmrc @@ -15,11 +15,11 @@ NoGrabServer RestartPreviousState DecorateTransients -TitleFont "-adobe-helvetica-bold-r-normal--*-120-*-*-*-*-*-*" -ResizeFont "-adobe-helvetica-bold-r-normal--*-120-*-*-*-*-*-*" -MenuFont "-adobe-helvetica-bold-r-normal--*-120-*-*-*-*-*-*" -IconFont "-adobe-helvetica-bold-r-normal--*-100-*-*-*-*-*-*" -IconManagerFont "-adobe-helvetica-bold-r-normal--*-100-*-*-*" +TitleFont "-gnu-unifont-medium-r-normal--16-*-*-*-*-*-iso10646-1,-*-helvetica-medium-r-*--17-*-*-*-*-*-*-*,-*-*-medium-r-normal-*-16-*-*-*-*-*-*-*,-*--16-*,*" +ResizeFont "-gnu-unifont-medium-r-normal--16-*-*-*-*-*-iso10646-1,-*-helvetica-medium-r-*--17-*-*-*-*-*-*-*,-*-*-medium-r-normal-*-16-*-*-*-*-*-*-*,-*--16-*,*" +MenuFont "-gnu-unifont-medium-r-normal--16-*-*-*-*-*-iso10646-1,-*-helvetica-medium-r-*--17-*-*-*-*-*-*-*,-*-*-medium-r-normal-*-16-*-*-*-*-*-*-*,-*--16-*,*" +IconFont "-gnu-unifont-medium-r-normal--16-*-*-*-*-*-iso10646-1,-*-helvetica-medium-r-*--17-*-*-*-*-*-*-*,-*-*-medium-r-normal-*-16-*-*-*-*-*-*-*,-*--16-*,*" +IconManagerFont "-gnu-unifont-medium-r-normal--16-*-*-*-*-*-iso10646-1,-*-helvetica-medium-r-*--17-*-*-*-*-*-*-*,-*-*-medium-r-normal-*-16-*-*-*-*-*-*-*,-*--16-*,*" #ClientBorderWidth Color ++++++ xauth-tolerant-hostname-changes.diff ++++++ --- xauth-1.0.3/gethost.c.orig +++ xauth-1.0.4/gethost.c @@ -244,7 +244,8 @@ struct addrlist *get_address_info ( int family, char *fulldpyname, int prefix, - char *host) + char *host, + char *localhostname) { struct addrlist *retval = NULL; int len = 0; @@ -274,7 +275,7 @@ struct addrlist *get_address_info ( if (prefix == 0 && (strncmp (fulldpyname, "unix:", 5) == 0 || fulldpyname[0] == ':')) { - if (!get_local_hostname (buf, sizeof buf)) { + if (!get_local_hostname (buf, sizeof buf, localhostname)) { len = 0; } else { src = buf; --- xauth-1.0.3/parsedpy.c.orig +++ xauth-1.0.4/parsedpy.c @@ -74,20 +74,24 @@ copystring (char *src, int len) char * -get_local_hostname (char *buf, int maxlen) +get_local_hostname (char *buf, int maxlen, char *localhostname) { buf[0] = '\0'; + if (localhostname) + strncpy(buf, localhostname, maxlen); + else (void) XmuGetHostname (buf, maxlen); + return (buf[0] ? buf : NULL); } #ifndef UNIXCONN static char * -copyhostname (void) +copyhostname (char *localhostname) { char buf[256]; - 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) */ Bool parse_displayname (char *displayname, + char *localhostname, int *familyp, /* return */ char **hostp, /* return */ int *dpynump, /* return */ @@ -138,7 +143,7 @@ parse_displayname (char *displayname, host = copystring ("0", 1); family = FamilyDECnet; } else { - host = copyhostname (); + host = copyhostname (localhostname); family = FamilyInternet; } #endif --- xauth-1.0.3/process.c.orig +++ xauth-1.0.4/process.c @@ -466,7 +466,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) { int family; char *host = NULL, *rest = NULL; @@ -489,11 +489,13 @@ get_displayname_auth(char *displayname, displayname = strrchr(displayname, '/') + 1; if (!parse_displayname (displayname + ((prelen > 0) ? prelen + 1 : 0), + localhostname, &family, &host, &dpynum, &scrnum, &rest)) { return False; } - addrlist_head = get_address_info(family, displayname, prelen, host); + addrlist_head = get_address_info(family, displayname, prelen, host, + localhostname); if (addrlist_head) { char buf[40]; /* want to hold largest display num */ unsigned short dpylen; @@ -1223,13 +1225,19 @@ iterdpy (char *inputfilename, int lineno 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]; - if (!get_displayname_auth (displayname, &proto_head)) { + if (!get_displayname_auth (displayname, &proto_head, xlocalhostname)) { prefix (inputfilename, lineno); baddisplayname (displayname, argv[0]); errors++; @@ -1568,7 +1576,7 @@ do_add(char *inputfilename, int lineno, } } - if (!get_displayname_auth (dpyname, &list)) { + if (!get_displayname_auth (dpyname, &list, NULL)) { prefix (inputfilename, lineno); baddisplayname (dpyname, argv[0]); free (key); --- xauth-1.0.3/xauth.h.orig +++ xauth-1.0.4/xauth.h @@ -51,10 +51,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 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 int auth_finalize ( void ); extern int process_command ( char *inputfilename, int lineno, int argc, char **argv ); ++++++ xdm-add-support-for-clients-that-sent-ipv4-addresses.diff ++++++
From 115841a8615a5807e227ccfa07756a58dbe18059 Mon Sep 17 00:00:00 2001 From: Christoph Bartoschek
Date: Sat, 28 Nov 2009 12:00:33 +0100 Subject: [PATCH] XDM: Add support for clients that sent ipv4 addresses to a dual-stacked host
If a client sends an ipv4 address to a dual-stacked xdm that is bound to a ipv6 socket in a forward request, then the packet was silently discarded. Now the address is encapsulated as a ipv4-mapped address and a response is send back. --- xdmcp.c | 23 ++++++++++++++++++++--- 1 files changed, 20 insertions(+), 3 deletions(-) diff --git a/xdmcp.c b/xdmcp.c index 7c91d1e..66a5e0f 100644 --- a/xdmcp.c +++ b/xdmcp.c @@ -791,8 +791,8 @@ forward_respond ( { struct sockaddr_in6 in6_addr; - if (clientAddress.length != 16 || - clientPort.length != 2) + if ((clientAddress.length != 16 && clientAddress.length != 4) || + (clientPort.length != 2)) { goto badAddress; } @@ -801,7 +801,24 @@ forward_respond ( in6_addr.sin6_len = sizeof(in6_addr); # endif in6_addr.sin6_family = AF_INET6; - memmove(&in6_addr.sin6_addr,clientAddress.data,clientAddress.length); + if (clientAddress.length == 16) { + memmove(in6_addr.sin6_addr.s6_addr, clientAddress.data, 16); + } else { + /* If the client wants to forward the xdm server to an + ipv4 hosts it sends an ipv4 address in the forward + packet. On dual-stack hosts the packet arrives as a + ipv6 packet. To respond to the ipv4 host one has + to create an ipv4-mapped address of the form + + ::ffff::xxx.xxx.xxx.xxx + + One example where this is necessary is an ipv4-only + thin client that connects to a dual-stacked xdm. + */ + in6_addr.sin6_addr.s6_addr[10] = 0xff; + in6_addr.sin6_addr.s6_addr[11] = 0xff; + memmove(in6_addr.sin6_addr.s6_addr + 12, clientAddress.data, 4); + } memmove((char *) &in6_addr.sin6_port, clientPort.data, 2); client = (struct sockaddr *) &in6_addr; clientlen = sizeof (in6_addr); -- 1.6.5.3 ++++++ xdm-tolerant-hostname-changes.diff ++++++ --- xdm-1.1.9/auth.c.orig +++ xdm-1.1.9/auth.c @@ -680,7 +680,7 @@ writeAddr ( } static void -DefineLocal (FILE *file, Xauth *auth) +DefineLocal (FILE *file, Xauth *auth, char **pLocalAddress) { char displayname[100]; int len = _XGetHostname (displayname, sizeof(displayname)); @@ -716,6 +716,9 @@ DefineLocal (FILE *file, Xauth *auth) #endif writeAddr (FamilyLocal, len, displayname, file, auth); + + if (pLocalAddress && displayname) + *pLocalAddress = strdup(displayname); } #ifdef HAS_GETIFADDRS @@ -1148,7 +1151,7 @@ setAuthNumber (Xauth *auth, char *name) } static void -writeLocalAuth (FILE *file, Xauth *auth, char *name) +writeLocalAuth (FILE *file, Xauth *auth, char *name, char **pLocalAddress) { int fd; @@ -1175,13 +1178,13 @@ writeLocalAuth (FILE *file, Xauth *auth, DefineSelf (fd, file, auth); close (fd); #endif - DefineLocal (file, auth); + DefineLocal (file, auth, pLocalAddress); } #ifdef XDMCP static void -writeRemoteAuth (FILE *file, Xauth *auth, XdmcpNetaddr peer, int peerlen, char *name) +writeRemoteAuth (FILE *file, Xauth *auth, XdmcpNetaddr peer, int peerlen, char *name, char **pLocalAddress) { int family = FamilyLocal; char *addr; @@ -1200,7 +1203,7 @@ writeRemoteAuth (FILE *file, Xauth *auth } else { - writeLocalAuth (file, auth, name); + writeLocalAuth (file, auth, name, pLocalAddress); } } @@ -1224,6 +1227,7 @@ SetUserAuthorization (struct display *d, #ifdef HAS_MKSTEMP int fd; #endif + char *localAddress = NULL; Debug ("SetUserAuthorization\n"); auths = d->authorizations; @@ -1316,10 +1320,10 @@ SetUserAuthorization (struct display *d, { magicCookie = i; if (d->displayType.location == Local) - writeLocalAuth (new, auths[i], d->name); + writeLocalAuth (new, auths[i], d->name,&localAddress); #ifdef XDMCP else - writeRemoteAuth (new, auths[i], d->peer, d->peerlen, d->name); + writeRemoteAuth (new, auths[i], d->peer, d->peerlen, d->name, &localAddress); #endif break; } @@ -1337,10 +1341,10 @@ SetUserAuthorization (struct display *d, !strncmp (auths[i]->name, "MIT-KERBEROS-5", 14)) auths[i]->data_length = 0; if (d->displayType.location == Local) - writeLocalAuth (new, auths[i], d->name); + writeLocalAuth (new, auths[i], d->name, &localAddress); #ifdef XDMCP else - writeRemoteAuth (new, auths[i], d->peer, d->peerlen, d->name); + writeRemoteAuth (new, auths[i], d->peer, d->peerlen, d->name, &localAddress); #endif auths[i]->data_length = data_len; } @@ -1379,6 +1383,12 @@ SetUserAuthorization (struct display *d, verify->systemEnviron = setEnv (verify->systemEnviron, "XAUTHORITY", envname); } + if (localAddress) { + verify->userEnviron = setEnv (verify->userEnviron, + "XAUTHLOCALHOSTNAME",localAddress); + free(localAddress); + } + XauUnlockAuth (name); if (envname) chown (envname, verify->uid, verify->gid); @@ -1417,10 +1427,10 @@ RemoveUserAuthorization (struct display for (i = 0; i < d->authNum; i++) { if (d->displayType.location == Local) - writeLocalAuth (new, auths[i], d->name); + writeLocalAuth (new, auths[i], d->name, NULL); #ifdef XDMCP else - writeRemoteAuth (new, auths[i], d->peer, d->peerlen, d->name); + writeRemoteAuth (new, auths[i], d->peer, d->peerlen, d->name,NULL); #endif } doWrite = 1; ++++++ xinit-suse.diff ++++++ --- xinit-1.1.1/startx.cpp.orig +++ xinit-1.1.1/startx.cpp @@ -72,10 +72,115 @@ userclientrc=$HOME/.xinitrc sysclientrc=XINITDIR/xinitrc #endif +XCOMM +XCOMM check for installed servers +XCOMM + +#ifdef linux + +INSTALLED_SERVERS=`ls -1 /usr/bin/Xorg /usr/X11R6/bin/XFree86 /usr/X11R6/bin/Xorg* 2>/dev/null` + + +if [ -z "$INSTALLED_SERVERS" ]; then + + echo "" + echo "You did not install any X-Server \(e.g. Xorg\)!" + echo "Please install at least one server to start X." + echo "I'm aborting now." + exit 1 +fi + + +XCOMM +XCOMM perhaps a windowmanager is specified? +XCOMM +XCOMM +XCOMM find wmlist utility, else take twm as default (always there :-)) +XCOMM +type -p wmlist &> /dev/null && WMLIST="`for i in $(wmlist); do echo $i; done | sort`" +test -z "$WMLIST" && WMLIST="twm" + +test "$1" = "--" || { test -n "$1" && WANTEDWM=`basename "$1"` ; } + +XCOMM +XCOMM User could have set a list of window manager in WINDOWMANAGERLIST. +XCOMM go throu wms and check if user specified a reachable one. +XCOMM + +for WM in $WMLIST $WINDOWMANAGERLIST +do + test "$WM" = "$WANTEDWM" && { +XCOMM +XCOMM is it reachable via $PATH? +XCOMM + type -p $WM &> /dev/null || { + + echo "`basename $0`: error: the requested window manager '$1' could not be found!" + echo "Window manager must be one of (currently installed window managers):" + for i in $WMLIST; do echo $i; done + exit 1 + } +XCOMM +XCOMM OK, we got it, this will be the override for WINDOWMANAGER +XCOMM + export WINDOWMANAGER=$WM + shift 1 + break + } +done + +unset WINDOWMANAGERLIST WMLIST WANTEDWM WM + +XCOMM +XCOMM check for the first link +XCOMM + +if [ ! -L /usr/X11R6/bin/X -a ! -L /usr/bin/X ]; then + + echo "" + echo "There is no link /usr/X11R6/bin/X (/usr/bin/Xorg) to /var/X11R6/bin/X!" + echo "Please link the files as mentioned above or install the X-Server again." + echo "I'm aborting now." + exit 1 +fi + +XCOMM +XCOMM check for the second link +XCOMM + +if [ ! -L /var/X11R6/bin/X ]; then + + echo "" + echo "There is no link /var/X11R6/bin/X to the correct X Server binary." + echo "Please configure the correct X Server with SaX/SaX2, which will create" + echo "the missing link. I'm aborting now." + exit 1 +fi + +XCOMM +XCOMM check if the Xorg file is an executable or an accidentially copied script or similar things +XCOMM + +if [ ! -x /var/X11R6/bin/X ]; then + + echo "" + echo "The file Xorg (binary of X-Server) doesn't seem to be a binary file." + echo "Please check it or / and install a new X-Server-binary." + echo "I'm aborting now." + exit 1 +fi + +#endif /* linux */ + +XCOMM set $DISPLAYMANAGER_XSERVER $DISPLAYMANAGER_XSERVER_TCP_PORT_6000_OPEN +. /etc/sysconfig/displaymanager + userserverrc=$HOME/.xserverrc sysserverrc=XINITDIR/xserverrc defaultclient=XTERM +XCOMM set X Server accordingly (Xorg/Xgl) defaultserver=XSERVER +test -n "$DISPLAYMANAGER_XSERVER" && defaultserver=/usr/bin/$DISPLAYMANAGER_XSERVER defaultclientargs="" defaultserverargs="" defaultdisplay=":0" @@ -312,6 +417,9 @@ else XINIT "$client" $clientargs -- "$server" $display $serverargs fi #else +XCOMM handle TCP port 6000 +test "$DISPLAYMANAGER_XSERVER_TCP_PORT_6000_OPEN" != "yes" && \ + serverargs="$serverargs -nolisten tcp" #ifdef __APPLE__ eval XINIT \"$client\" $clientargs -- \"$server\" $display $serverargs --- xinit-1.1.1/xinitrc.cpp.orig +++ xinit-1.1.1/xinitrc.cpp @@ -96,8 +96,10 @@ fi #endif -TWM & +if [ -x /usr/X11R6/bin/fvwm -o -x /usr/bin/fvwm]; then + exec fvwm +fi XCLOCK -geometry 50x50-1+1 & XTERM -geometry 80x50+494+51 & XTERM -geometry 80x20+494-0 & -exec XTERM -geometry 80x66+0+0 -name login +exec TWM ++++++ xinit-tolerant-hostname-changes.diff ++++++ --- xinit-1.1.1/startx.cpp.orig +++ xinit-1.1.1/startx.cpp @@ -420,6 +420,7 @@ fi XCOMM handle TCP port 6000 test "$DISPLAYMANAGER_XSERVER_TCP_PORT_6000_OPEN" != "yes" && \ serverargs="$serverargs -nolisten tcp" +export XAUTHLOCALHOSTNAME=`hostname` #ifdef __APPLE__ eval XINIT \"$client\" $clientargs -- \"$server\" $display $serverargs ++++++ xrdb.diff ++++++ Index: xorg-x11-7.4/xrdb-1.0.5/xrdb.c =================================================================== --- xorg-x11-7.4/xrdb-1.0.5.orig/xrdb.c +++ xorg-x11-7.4/xrdb-1.0.5/xrdb.c @@ -504,6 +504,8 @@ DoDisplayDefines(Display *display, Strin int n; XmuGetHostname(client, MAXHOSTNAMELEN); + if (!strcmp(client,"(none)")) + strncpy(client,"\"(none)\"", sizeof(client)); strncpy(server, XDisplayName(host), sizeof(server)); server[sizeof(server) - 1] = '\0'; /* search for final colon to skip over any embedded colons in IPv6 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org