xserver: Branch 'server-1.7-nominations' - 4 commits

Alan Coopersmith alanc at kemper.freedesktop.org
Sat Aug 21 14:33:55 PDT 2010


 doc/Xserver.man.pre       |   26 +++++++++-----------------
 hw/xfree86/parser/Input.c |    7 +++++--
 os/access.c               |   14 +++++++++-----
 3 files changed, 23 insertions(+), 24 deletions(-)

New commits:
commit 4c313472c45de171efb76231e7c7f323aa4eda3f
Author: Alan Coopersmith <alan.coopersmith at oracle.com>
Date:   Thu May 20 17:56:26 2010 -0700

    Xserver(1) man page updates
    
    - Note that -br is now default.
    - Move -bs after -br for alphabetical ordering.
    - Remove -config option that's been hidden in "ignore" section,
      since ajax removed the -config code a couple years back.
    - Add -nocursor option.
    - Add xinput & xrandr to list of runtime server control programs
    - Replace XDarwin with Xquartz in list of Xservers
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
    Reviewed-by: Adam Jackson <ajax at redhat.com>
    Signed-off-by: Keith Packard <keithp at keithp.com>
    (cherry picked from commit 7b09335a46f9428141811230c69eef7968531359)

diff --git a/doc/Xserver.man.pre b/doc/Xserver.man.pre
index 6154191..d225c26 100644
--- a/doc/Xserver.man.pre
+++ b/doc/Xserver.man.pre
@@ -100,12 +100,12 @@ specifies a file which contains a collection of authorization records used
 to authenticate access.  See also the \fIxdm\fP(1) and 
 \fIXsecurity\fP(__miscmansuffix__) manual pages.
 .TP 8
-.B \-bs
-disables backing store support on all screens.
-.TP 8
 .B \-br
 sets the default root window to solid black instead of the standard root weave
-pattern.
+pattern.   This is the default unless -retro or -wr is specified.
+.TP 8
+.B \-bs
+disables backing store support on all screens.
 .TP 8
 .B \-c
 turns off key-click.
@@ -117,17 +117,6 @@ sets key-click volume (allowable range: 0-100).
 sets the visual class for the root window of color screens.
 The class numbers are as specified in the X protocol.
 Not obeyed by all servers.
-.ig
-.TP 8
-.B \-config \fIfilename\fP
-reads more options from the given file.  Options in the file may be separated
-by newlines if desired.  If a '#' character appears on a line, all characters
-between it and the next newline are ignored, providing a simple commenting
-facility.  The \fB\-config\fP option itself may appear in the file.
-.BR NOTE :
-This option is disabled when the Xserver is run with an effective uid
-different from the user's real uid.
-..
 .TP 8
 .B \-core
 causes the server to generate a core dump on fatal errors.
@@ -184,6 +173,9 @@ sets the maximum big request to
 .I size
 MB.
 .TP 8
+.B \-nocursor
+disable the display of the pointer cursor.
+.TP 8
 .B \-nolisten \fItrans-type\fP
 disables a transport type.  For example, TCP/IP connections can be disabled
 with
@@ -584,11 +576,11 @@ Security: \fIXsecurity\fP(__miscmansuffix__), \fIxauth\fP(1), \fIXau\fP(1),
 Starting the server: \fIstartx\fP(1), \fIxdm\fP(1), \fIxinit\fP(1)
 .PP
 Controlling the server once started: \fIxset\fP(1), \fIxsetroot\fP(1),
-\fIxhost\fP(1)
+\fIxhost\fP(1), \fIxinput\fP(1), \fIxrandr\fP(1)
 .PP
 Server-specific man pages:
 \fIXorg\fP(1), \fIXdmx\fP(1), \fIXephyr\fP(1), \fIXnest\fP(1),
-\fIXvfb\fP(1), \fIXDarwin\fP(1), \fIXWin\fP(1).
+\fIXvfb\fP(1), \fIXquartz\fP(1), \fIXWin\fP(1).
 .PP
 Server internal documentation:
 .I "Definition of the Porting Layer for the X v11 Sample Server"
commit 7787526a715a3179085bdc70110f5102a02706e3
Author: Simon Farnsworth <simon.farnsworth at onelan.com>
Date:   Tue Jun 22 10:13:30 2010 +0100

    Don't crash when asked if a client that has disconnected was local
    
    ProcDRI2Dispatch uses LocalClient to determine if it's safe to respond
    to a client that has made DRI2 requests which aren't sensible for
    remote clients (anything but version). When the client has disappeared
    mid-request stream (e.g. as a result of a kill -9, or a client-side
    bug), LocalClient causes the X server to follow suit, as
    ((OsCommPtr)client->osPrivate)->trans_conn is NULL at this point.
    
    The simple and obvious fix is to just return "not local" when
    trans_conn is NULL, which fixes the crash I was seeing; however Keith
    Packard pointed out that just checking trans_conn isn't enough;
    quoting Keith:
    
    "This looks almost right to me -- I reviewed the os code to see when
    _XSERVTransClose is called (which is what frees the trans_conn data) and
    found that every place which called that immediately set trans_conn to
    NULL, except for the call in CloseDownFileDescriptor which is only
    called from CloseDownConnection and which is immediately followed by
    freeing the OsCommRec and setting client->osPrivate to NULL. So, I'd
    suggest checking client->osPrivate in addition to the above check."
    
    Signed-off-by: Simon Farnsworth <simon.farnsworth at onelan.com>
    Reviewed-by: Keith Packard <keithp at keithp.com>
    Signed-off-by: Keith Packard <keithp at keithp.com>
    (cherry picked from commit 660f6ab5494a728c3ca7ba00c305e9ff06c8ecb2)

diff --git a/os/access.c b/os/access.c
index 3572da0..859f32e 100644
--- a/os/access.c
+++ b/os/access.c
@@ -1123,6 +1123,11 @@ Bool LocalClient(ClientPtr client)
     pointer		addr;
     register HOST	*host;
 
+    if (!client->osPrivate)
+        return FALSE;
+    if (!((OsCommPtr)client->osPrivate)->trans_conn)
+        return FALSE;
+
     if (!_XSERVTransGetPeerAddr (((OsCommPtr)client->osPrivate)->trans_conn,
 	&notused, &alen, &from))
     {
commit e1cf1e88bb527d48f7bdea5fc0091a1bd651acec
Author: Alan Coopersmith <alan.coopersmith at oracle.com>
Date:   Thu Apr 29 18:45:34 2010 -0700

    Fix compiler issues with getifaddrs() call on OpenSolaris
    
    OpenSolaris recently added support for the getifaddrs() API.
    
    Building with that uncovered two compiler issues (one warning, one error)
    in the code that was now being built for the first time in our builds:
    
    "access.c", line 768: warning: argument #1 is incompatible with prototype:
            prototype: pointer to struct sockaddr {unsigned short sa_family, array[14] of char sa_data} : "access.c", line 213
            argument : pointer to struct sockaddr_storage {unsigned short ss_family, array[6] of char _ss_pad1, double _ss_align, array[240] of char _ss_pad2}
    
    "access.c", line 838: assignment type mismatch:
            struct sockaddr {unsigned short sa_family, array[14] of char sa_data} "=" struct sockaddr_storage {unsigned short ss_family, array[6] of char _ss_pad1, double _ss_align, array[240] of char _ss_pad2}
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
    Reviewed-by: Jamey Sharp <jamey at minilop.net>
    (cherry picked from commit e42a29d269fadc11e065c63ee369e3165196f2d7)

diff --git a/os/access.c b/os/access.c
index 74c340a..3572da0 100644
--- a/os/access.c
+++ b/os/access.c
@@ -765,7 +765,8 @@ DefineSelf (int fd)
 	    continue;
 #endif /* DNETCONN */
 	len = sizeof(*(ifr->ifa_addr));
-	family = ConvertAddr(ifr->ifa_addr, &len, (pointer *)&addr);
+	family = ConvertAddr((struct sockaddr *) ifr->ifa_addr, &len,
+			     (pointer *)&addr);
 	if (family == -1 || family == FamilyLocal) 
 	    continue;
 #if defined(IPv6) && defined(AF_INET6)
@@ -789,7 +790,6 @@ DefineSelf (int fd)
 	}
 #ifdef XDMCP
 	{
-	    struct sockaddr broad_addr;
 	    /*
 	     * If this isn't an Internet Address, don't register it.
 	     */
@@ -835,11 +835,10 @@ DefineSelf (int fd)
 	    if ((ifr->ifa_flags & IFF_BROADCAST) &&
 		(ifr->ifa_flags & IFF_UP) &&
                 ifr->ifa_broadaddr)
-		broad_addr = *ifr->ifa_broadaddr;
+		XdmcpRegisterBroadcastAddress(
+		    (struct sockaddr_in *) ifr->ifa_broadaddr);
 	    else
 		continue;
-	    XdmcpRegisterBroadcastAddress((struct sockaddr_in *)
-					  &broad_addr);
 	}
 #endif /* XDMCP */
 		
commit c4717321c01678209ea5c7215d31556f6eadb798
Author: Jesse Adkins <jesserayadkins at gmail.com>
Date:   Wed Aug 4 23:39:14 2010 -0700

    xfree86: parser: Never use constant strings for driver names (fixes #17438)
    
    When the parser sees the "keyboard" driver, it automatically (and
     silently) replaces it with the constant string "kbd".
    Everybody else uses malloc'd memory for the driver name, so input
     device closure assumes it can use free.
    Free val.str, so this crash doesn't turn into a memory leak. Whew.
    
    Signed-off-by: Jesse Adkins <jesserayadkins at gmail.com>
    Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net>
    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
    (cherry picked from commit bce12f2956f23c0ee53f7f6485dba631293a0931)

diff --git a/hw/xfree86/parser/Input.c b/hw/xfree86/parser/Input.c
index 4e3c04e..953215b 100644
--- a/hw/xfree86/parser/Input.c
+++ b/hw/xfree86/parser/Input.c
@@ -59,6 +59,7 @@
 #include <xorg-config.h>
 #endif
 
+#include "os.h"
 #include "xf86Parser.h"
 #include "xf86tokens.h"
 #include "Configint.h"
@@ -102,8 +103,10 @@ xf86parseInputSection (void)
 		case DRIVER:
 			if (xf86getSubToken (&(ptr->inp_comment)) != STRING)
 				Error (QUOTE_MSG, "Driver");
-                        if (strcmp(val.str, "keyboard") == 0)
-                            ptr->inp_driver = "kbd";
+                        if (strcmp(val.str, "keyboard") == 0) {
+                            ptr->inp_driver = strdup("kbd");
+                            free(val.str);
+                        }
                         else
 			    ptr->inp_driver = val.str;
 			break;


More information about the xorg-commit mailing list