xserver: Branch 'server-1.4-branch' - 6 commits

Daniel Stone daniels at kemper.freedesktop.org
Tue Nov 6 17:50:36 PST 2007


 .gitignore                     |    4 +++-
 config/dbus.c                  |    4 ++--
 configure.ac                   |    1 +
 dix/devices.c                  |    1 +
 hw/xfree86/modes/xf86RandR12.c |   18 ++++++++++++++----
 include/dix-config.h.in        |    3 +++
 os/Makefile.am                 |    6 +++++-
 os/rpcauth.c                   |   16 ++++++++--------
 8 files changed, 37 insertions(+), 16 deletions(-)

New commits:
commit 7f231de5e05a8755d76e18595c57baf2e239a4be
Author: Daniel Stone <daniel at fooishbar.org>
Date:   Tue Nov 6 15:05:06 2007 +0000

    .gitignore: Ignore build directories
    
    Ignore directories people might use for building.
    (cherry picked from commit 36df34cffd0cfcfb250fb42596781b3d4e9871eb)

diff --git a/.gitignore b/.gitignore
index e4b3d31..887e4ad 100644
--- a/.gitignore
+++ b/.gitignore
@@ -8,6 +8,9 @@ Makefile.in
 *.a
 *.o
 *~
+.*.swp
+obj*
+build*
 aclocal.m4
 autom4te.cache
 compile
@@ -268,4 +271,3 @@ mfb/mfbteblack.c
 mfb/mfbtewhite.c
 mfb/mfbtileC.c
 mfb/mfbtileG.c
-.*.swp
commit 4c20d6104691b370f14216035b5ff07ad5633098
Author: Alan Coopersmith <alan.coopersmith at sun.com>
Date:   Fri Aug 17 15:29:16 2007 -0700

    Actually build Secure RPC authentication support (missed in modularization)
    (cherry picked from commit 23fbd5292d356067e85e1eec4eb4f743532b0503)

diff --git a/configure.ac b/configure.ac
index d9351ef..dedc5f1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -580,6 +580,7 @@ XTRANS_CONNECTION_FLAGS
 
 # Secure RPC detection macro from xtrans.m4
 XTRANS_SECURE_RPC_FLAGS
+AM_CONDITIONAL(SECURE_RPC, [test "x$SECURE_RPC" = xyes])
 
 AM_CONDITIONAL(INT10_VM86, [test "x$INT10" = xvm86])
 AM_CONDITIONAL(INT10_X86EMU, [test "x$INT10" = xx86emu])
diff --git a/include/dix-config.h.in b/include/dix-config.h.in
index ad97605..69fab5e 100644
--- a/include/dix-config.h.in
+++ b/include/dix-config.h.in
@@ -282,6 +282,9 @@
 /* Support MIT-SCREEN-SAVER extension */
 #undef SCREENSAVER
 
+/* Support Secure RPC ("SUN-DES-1") authentication for X11 clients */
+#undef SECURE_RPC
+
 /* Use a lock to prevent multiple servers on a display */
 #undef SERVER_LOCK
 
diff --git a/os/Makefile.am b/os/Makefile.am
index 53b2d7f..d2a9897 100644
--- a/os/Makefile.am
+++ b/os/Makefile.am
@@ -3,9 +3,9 @@ noinst_LTLIBRARIES = libos.la libcwrapper.la
 AM_CFLAGS = $(DIX_CFLAGS)
 
 # FIXME: Add support for these in configure.ac
-SECURERPC_SRCS = rpcauth.c
 INTERNALMALLOC_SRCS = xalloc.c
 
+SECURERPC_SRCS = rpcauth.c
 XCSECURITY_SRCS = secauth.c
 XDMCP_SRCS = xdmcp.c
 STRLCAT_SRCS = strlcat.c strlcpy.c
@@ -28,6 +28,10 @@ libos_la_SOURCES = 	\
 	xprintf.c	\
 	$(XORG_SRCS)
 
+if SECURE_RPC
+libos_la_SOURCES += $(SECURERPC_SRCS)
+endif
+
 if XCSECURITY
 libos_la_SOURCES += $(XCSECURITY_SRCS)
 endif
diff --git a/os/rpcauth.c b/os/rpcauth.c
index 603844a..3451ac1 100644
--- a/os/rpcauth.c
+++ b/os/rpcauth.c
@@ -39,7 +39,7 @@ from The Open Group.
 #ifdef SECURE_RPC
 
 #include <X11/X.h>
-#include "Xauth.h"
+#include <X11/Xauth.h>
 #include "misc.h"
 #include "os.h"
 #include "dixstruct.h"
@@ -135,7 +135,7 @@ CheckNetName (
 
 static char rpc_error[MAXNETNAMELEN+50];
 
-XID
+_X_HIDDEN XID
 SecureRPCCheck (unsigned short data_length, char *data, 
     ClientPtr client, char **reason)
 {
@@ -159,14 +159,14 @@ SecureRPCCheck (unsigned short data_length, char *data,
     return (XID) ~0L;
 }
     
-void
+_X_HIDDEN void
 SecureRPCInit (void)
 {
     if (rpc_id == ~0L)
 	AddAuthorization (9, "SUN-DES-1", 0, (char *) 0);
 }
 
-int
+_X_HIDDEN int
 SecureRPCAdd (unsigned short data_length, char *data, XID id)
 {
     if (data_length)
@@ -175,26 +175,26 @@ SecureRPCAdd (unsigned short data_length, char *data, XID id)
     return 1;
 }
 
-int
+_X_HIDDEN int
 SecureRPCReset (void)
 {
     rpc_id = (XID) ~0L;
     return 1;
 }
 
-XID
+_X_HIDDEN XID
 SecureRPCToID (unsigned short data_length, char *data)
 {
     return rpc_id;
 }
 
-int
+_X_HIDDEN int
 SecureRPCFromID (XID id, unsigned short *data_lenp, char **datap)
 {
     return 0;
 }
 
-int
+_X_HIDDEN int
 SecureRPCRemove (unsigned short data_length, char *data)
 {
     return 0;
commit f350c81a912cf5eab8d88a7800a828141945a2f0
Author: Matthias Hopf <mhopf at suse.de>
Date:   Wed Oct 24 20:31:51 2007 +0200

    Prefer configured DisplaySize to probed DDC data, if available.
    
    Based on patch by Hong Liu <hong.liu at intel.com>.
    (cherry picked from commit 48ca5961caee62f2980017a6bdc96a1b4c747727)

diff --git a/hw/xfree86/modes/xf86RandR12.c b/hw/xfree86/modes/xf86RandR12.c
index 38435c9..7169f74 100644
--- a/hw/xfree86/modes/xf86RandR12.c
+++ b/hw/xfree86/modes/xf86RandR12.c
@@ -426,8 +426,18 @@ xf86RandR12CreateScreenResources (ScreenPtr pScreen)
 	    xf86OutputPtr   output = config->output[config->compat_output];
 	    xf86CrtcPtr	    crtc = output->crtc;
 
-	    if (crtc && crtc->mode.HDisplay &&
-		output->mm_width && output->mm_height)
+	    if (output->conf_monitor &&
+		(output->conf_monitor->mon_width  > 0 &&
+		 output->conf_monitor->mon_height > 0))
+	    {
+		/*
+		 * Prefer user configured DisplaySize
+		 */
+		mmWidth = output->conf_monitor->mon_width;
+		mmHeight = output->conf_monitor->mon_height;
+	    }
+	    else if (crtc && crtc->mode.HDisplay &&
+		     output->mm_width && output->mm_height)
 	    {
 		/*
 		 * If the output has a mode and a declared size, use that
commit c5501865703d5d4ee49e081b6075ab89a583deb6
Author: Keith Packard <keithp at koto.keithp.com>
Date:   Sun Aug 19 20:29:37 2007 -0700

    Screen size changing should leave FB alone when X is inactive.
    
    xf86RandR12ScreenSetSize must protect calls to EnableDisableFBAccess with
    suitable vtSema checks to avoid invoking driver code while the X server is
    inactive.
    (cherry picked from commit 265a633cf1fcbf497d6916d9e22403dffdde2e07)

diff --git a/hw/xfree86/modes/xf86RandR12.c b/hw/xfree86/modes/xf86RandR12.c
index e46d8a0..38435c9 100644
--- a/hw/xfree86/modes/xf86RandR12.c
+++ b/hw/xfree86/modes/xf86RandR12.c
@@ -345,7 +345,7 @@ xf86RandR12ScreenSetSize (ScreenPtr	pScreen,
 	randrp->virtualX = pScrn->virtualX;
 	randrp->virtualY = pScrn->virtualY;
     }
-    if (pRoot)
+    if (pRoot && pScrn->vtSema)
 	(*pScrn->EnableDisableFBAccess) (pScreen->myNum, FALSE);
 
     /* Let the driver update virtualX and virtualY */
@@ -363,7 +363,7 @@ xf86RandR12ScreenSetSize (ScreenPtr	pScreen,
     xf86SetViewport (pScreen, 0, 0);
 
 finish:
-    if (pRoot)
+    if (pRoot && pScrn->vtSema)
 	(*pScrn->EnableDisableFBAccess) (pScreen->myNum, TRUE);
 #if RANDR_12_INTERFACE
     if (WindowTable[pScreen->myNum] && ret)
commit 9244b8e4a2274946b56d9cf6d43487e11c29f7d7
Author: Elvis Pranskevichus <el at prans.net>
Date:   Tue Nov 6 09:40:14 2007 +0000

    Config: D-Bus: Fix dbus_bus_request_name failure check
    
    The code in connect_hook incorrectly checks for dbus_bus_request_name failure.
    The dbus_bus_request_name error indicator is -1, not 0. This leads
    to subsequent assertion failure in libdbus.
    (cherry picked from commit ddce48ede036f3996f8e584b0012c396c5df42fb)

diff --git a/config/dbus.c b/config/dbus.c
index c867512..6fe0618 100644
--- a/config/dbus.c
+++ b/config/dbus.c
@@ -355,8 +355,8 @@ connect_hook(DBusConnection *connection, void *data)
 
     dbus_error_init(&error);
 
-    if (!dbus_bus_request_name(info->connection, info->busname,
-                               0, &error)) {
+    dbus_bus_request_name(info->connection, info->busname, 0, &error);
+    if (dbus_error_is_set(&error)) {
         ErrorF("[config/dbus] couldn't take over org.x.config: %s (%s)\n",
                error.name, error.message);
         goto err_start;
commit 0050d7e78d990fa945bd808554b0a86721262786
Author: Daniel Stone <daniel at fooishbar.org>
Date:   Tue Nov 6 14:52:03 2007 +0000

    DIX: XKB: Set xkbInfo to NULL as well as freeing it (bug #10639)
    
    XkbRemoveResourceClient wants to access xkbInfo if it exists, so make
    sure we NULL it after freeing it.  It doesn't make much sense to move
    the RemoveResourceClient call first, as there's not much point in
    notifying clients while we're shutting the server down anyway.
    (cherry picked from commit 23023af1c5a33546a2027cad23a946a2882e9893)

diff --git a/dix/devices.c b/dix/devices.c
index e05444e..287d730 100644
--- a/dix/devices.c
+++ b/dix/devices.c
@@ -528,6 +528,7 @@ CloseDevice(DeviceIntPtr dev)
 	if (dev->key->xkbInfo)
 	    XkbFreeInfo(dev->key->xkbInfo);
 #endif
+        dev->key->xkbInfo = NULL;
 	xfree(dev->key->curKeySyms.map);
 	xfree(dev->key->modifierKeyMap);
 	xfree(dev->key);


More information about the xorg-commit mailing list