xserver: Branch 'master' - 6 commits
Keith Packard
keithp at kemper.freedesktop.org
Thu Jun 10 19:21:07 PDT 2010
Xext/panoramiXprocs.c | 2 -
Xext/security.c | 8 ++++---
configure.ac | 8 ++++++-
fb/Makefile.am | 2 +
hw/xfree86/int10/Makefile.am | 1
hw/xfree86/os-support/solaris/sun_agp.c | 10 ++++-----
hw/xnest/Drawable.h | 2 -
miext/damage/damage.c | 4 +--
randr/rrcrtc.c | 33 --------------------------------
9 files changed, 24 insertions(+), 46 deletions(-)
New commits:
commit 620ca54aaa0b363fcf68cec1bd6c37e68c988352
Merge: fd69234... 8ff9b50...
Author: Keith Packard <keithp at keithp.com>
Date: Thu Jun 10 19:18:53 2010 -0700
Merge remote branch 'alanc/master'
commit fd69234db004e98c663f5c6c4360d2cecaa8a4df
Author: Keith Packard <keithp at keithp.com>
Date: Sun Jun 6 15:21:28 2010 -0700
Ignore RandR timestamps harder
Checking timestamps in post 1.1 randr requests was never a good idea,
let's ignore them and just make the configuration changes.
Signed-off-by: Keith Packard <keithp at keithp.com>
Acked-by: Chase Douglas <chase.douglas at canonical.com>
diff --git a/randr/rrcrtc.c b/randr/rrcrtc.c
index f5fe765..14f6e45 100644
--- a/randr/rrcrtc.c
+++ b/randr/rrcrtc.c
@@ -863,19 +863,6 @@ ProcRRSetCrtcConfig (ClientPtr client)
goto sendReply;
}
-#if 0
- /*
- * if the client's config timestamp is not the same as the last config
- * timestamp, then the config information isn't up-to-date and
- * can't even be validated
- */
- if (CompareTimeStamps (configTime, pScrPriv->lastConfigTime) != 0)
- {
- rep.status = RRSetConfigInvalidConfigTime;
- goto sendReply;
- }
-#endif
-
/*
* Validate requested rotation
*/
@@ -948,16 +935,6 @@ ProcRRSetCrtcConfig (ClientPtr client)
#endif
}
- /*
- * Make sure the requested set-time is not older than
- * the last set-time
- */
- if (CompareTimeStamps (time, pScrPriv->lastSetTime) < 0)
- {
- rep.status = RRSetConfigInvalidTime;
- goto sendReply;
- }
-
if (!RRCrtcSet (crtc, mode, stuff->x, stuff->y,
rotation, numOutputs, outputs))
{
@@ -1088,16 +1065,6 @@ ProcRRSetPanning (ClientPtr client)
time = ClientTimeToServerTime(stuff->timestamp);
- /*
- * Make sure the requested set-time is not older than
- * the last set-time
- */
- if (CompareTimeStamps (time, pScrPriv->lastSetTime) < 0)
- {
- rep.status = RRSetConfigInvalidTime;
- goto sendReply;
- }
-
if (!pScrPriv->rrGetPanning)
return RRErrorBase + BadRRCrtc;
commit a8ec9eca850f2a7ad4c5cf31c1c011c120688496
Author: Keith Packard <keithp at keithp.com>
Date: Mon Jun 7 13:39:11 2010 -0700
Fix a couple more possible errors with input-only windows
Using type == DRAWABLE_WINDOW to differentiate between pixmaps and
windows isn't sufficient as input-only windows will end up in the
pixmap case. This patch changes a few more code paths to use
WindowDrawable instead.
Signed-off-by: Keith Packard <keithp at keithp.com>
Reviewed-by: Jamey Sharp <jamey at minilop.net>
diff --git a/Xext/panoramiXprocs.c b/Xext/panoramiXprocs.c
index b744e4d..67b4030 100644
--- a/Xext/panoramiXprocs.c
+++ b/Xext/panoramiXprocs.c
@@ -557,7 +557,7 @@ int PanoramiXGetGeometry(ClientPtr client)
rep.width = root->pixWidth;
rep.height = root->pixHeight;
} else
- if ((pDraw->type == UNDRAWABLE_WINDOW) || (pDraw->type == DRAWABLE_WINDOW))
+ if (WindowDrawable(pDraw->type))
{
WindowPtr pWin = (WindowPtr)pDraw;
rep.x = pWin->origin.x - wBorderWidth (pWin);
diff --git a/hw/xnest/Drawable.h b/hw/xnest/Drawable.h
index d94916e..4268b7b 100644
--- a/hw/xnest/Drawable.h
+++ b/hw/xnest/Drawable.h
@@ -19,7 +19,7 @@ is" without express or implied warranty.
#include "XNPixmap.h"
#define xnestDrawable(pDrawable) \
- ((pDrawable)->type == DRAWABLE_WINDOW ? \
+ (WindowDrawable((pDrawable)->type) ? \
xnestWindow((WindowPtr)pDrawable) : \
xnestPixmap((PixmapPtr)pDrawable))
diff --git a/miext/damage/damage.c b/miext/damage/damage.c
index 7c2f8a0..1cf0513 100644
--- a/miext/damage/damage.c
+++ b/miext/damage/damage.c
@@ -84,7 +84,7 @@ getDrawableDamageRef (DrawablePtr pDrawable)
{
PixmapPtr pPixmap;
- if (pDrawable->type == DRAWABLE_WINDOW)
+ if (WindowDrawable(pDrawable->type))
{
ScreenPtr pScreen = pDrawable->pScreen;
@@ -300,7 +300,7 @@ damageRegionAppend (DrawablePtr pDrawable, RegionPtr pRegion, Bool clip,
* Need to move everyone to screen coordinates
* XXX what about off-screen pixmaps with non-zero x/y?
*/
- if (pDamage->pDrawable->type != DRAWABLE_WINDOW)
+ if (!WindowDrawable(pDamage->pDrawable->type))
{
draw_x += ((PixmapPtr) pDamage->pDrawable)->screen_x;
draw_y += ((PixmapPtr) pDamage->pDrawable)->screen_y;
commit 8ff9b502cfce3828f7855ffba7949d6ebee34031
Author: Alan Coopersmith <alan.coopersmith at oracle.com>
Date: Fri Jun 4 08:44:02 2010 -0700
Solaris: avoid memory leak if AGPIOC_INFO ioctl fails
Move malloc after ioctl, so we don't have to worry about free'ing the
memory if the ioctl fails.
[ This bug was found by the Parfait bug checking tool.
For more information see http://research.sun.com/projects/parfait ]
Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
Reviewed-by: Mikhail Gusarov <dottedmag at dottedmag.net>
diff --git a/hw/xfree86/os-support/solaris/sun_agp.c b/hw/xfree86/os-support/solaris/sun_agp.c
index 734a6e1..9db5d63 100644
--- a/hw/xfree86/os-support/solaris/sun_agp.c
+++ b/hw/xfree86/os-support/solaris/sun_agp.c
@@ -115,16 +115,16 @@ xf86GetAGPInfo(int screenNum)
if (!GARTInit(screenNum))
return NULL;
- if ((info = calloc(sizeof(AgpInfo), 1)) == NULL) {
+ if (ioctl(gartFd, AGPIOC_INFO, &agpinf) != 0) {
xf86DrvMsg(screenNum, X_ERROR,
- "xf86GetAGPInfo: Failed to allocate AgpInfo\n");
+ "xf86GetAGPInfo: AGPIOC_INFO failed (%s)\n",
+ strerror(errno));
return NULL;
}
- if (ioctl(gartFd, AGPIOC_INFO, &agpinf) != 0) {
+ if ((info = calloc(sizeof(AgpInfo), 1)) == NULL) {
xf86DrvMsg(screenNum, X_ERROR,
- "xf86GetAGPInfo: AGPIOC_INFO failed (%s)\n",
- strerror(errno));
+ "xf86GetAGPInfo: Failed to allocate AgpInfo\n");
return NULL;
}
commit c5eb5d69e5183860185a05cfcce16af635cab9aa
Author: Alan Coopersmith <alan.coopersmith at oracle.com>
Date: Thu Jun 3 19:28:43 2010 -0700
Record some additional library dependencies in xf86 modules
Helps with symbol resolution when building with -z defs
Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
Reviewed-by: Dan Nicholson <dbn.lists at gmail.com>
diff --git a/configure.ac b/configure.ac
index 02660a6..4ada8f5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -794,7 +794,7 @@ APPLEWMPROTO="applewmproto >= 1.4"
dnl Core modules for most extensions, et al.
REQUIRED_MODULES="[randrproto >= 1.2.99.3] [renderproto >= 0.11] [fixesproto >= 4.1] [damageproto >= 1.1] [xcmiscproto >= 1.2.0] [xextproto >= 7.0.99.3] [xproto >= 7.0.17] [xtrans >= 1.2.2] [bigreqsproto >= 1.1.0] fontsproto [inputproto >= 1.9.99.902] [kbproto >= 1.0.3]"
-REQUIRED_LIBS="xfont xau [pixman-1 >= 0.15.20]"
+REQUIRED_LIBS="xfont xau"
dnl List of libraries that require a specific version
LIBAPPLEWM="applewm >= 1.4"
@@ -810,6 +810,12 @@ LIBGLIB="glib-2.0 >= 2.16"
LIBUDEV="libudev >= 143"
LIBSELINUX="libselinux >= 2.0.86"
LIBDBUS="dbus-1 >= 1.0"
+LIBPIXMAN="pixman-1 >= 0.15.20"
+
+dnl Pixman is always required, but we separate it out so we can link
+dnl specific modules against it
+PKG_CHECK_MODULES(PIXMAN, $LIBPIXMAN)
+REQUIRED_LIBS="$REQUIRED_LIBS $LIBPIXMAN"
if test "x$CONFIG_UDEV" = xyes &&
{ test "x$CONFIG_DBUS_API" = xyes || test "x$CONFIG_HAL" = xyes; }; then
diff --git a/fb/Makefile.am b/fb/Makefile.am
index 64e49f3..2f3073d 100644
--- a/fb/Makefile.am
+++ b/fb/Makefile.am
@@ -11,8 +11,10 @@ sdk_HEADERS = fb.h fbrop.h fboverlay.h wfbrename.h fbpict.h
endif
libfb_la_CFLAGS = $(AM_CFLAGS)
+libfb_la_LIBADD = $(PIXMAN_LIBS)
libwfb_la_CFLAGS = $(AM_CFLAGS) -DFB_ACCESS_WRAPPER
+libwfb_la_LIBADD = $(PIXMAN_LIBS)
libfb_la_SOURCES = \
fb.h \
diff --git a/hw/xfree86/int10/Makefile.am b/hw/xfree86/int10/Makefile.am
index 36d2ad0..f5ece69 100644
--- a/hw/xfree86/int10/Makefile.am
+++ b/hw/xfree86/int10/Makefile.am
@@ -5,6 +5,7 @@ sdk_HEADERS = xf86int10.h
EXTRA_CFLAGS =
libint10_la_LDFLAGS = -avoid-version
+libint10_la_LIBADD = $(PCIACCESS_LIBS)
COMMON_SOURCES = \
helper_exec.c \
commit 1c08a37e0eb4746e8974eb7a70ca4b7b84712963
Author: Sam Lau <sam.lau at oracle.com>
Date: Thu Jun 3 19:17:14 2010 -0700
SecurityResource should not segfault when client owning resource has exited
Fixes OpenSolaris bug 6949754:
Xorg crashes when the magnifier is enabled at gdm login greeter window.
http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6949754
Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
Reviewed-by: Eamon Walsh <ewalsh at tycho.nsa.gov>
diff --git a/Xext/security.c b/Xext/security.c
index b37339f..7eb95de 100644
--- a/Xext/security.c
+++ b/Xext/security.c
@@ -805,7 +805,6 @@ SecurityResource(CallbackListPtr *pcbl, pointer unused, pointer calldata)
Mask allowed = SecurityResourceMask;
subj = dixLookupPrivate(&rec->client->devPrivates, stateKey);
- obj = dixLookupPrivate(&clients[cid]->devPrivates, stateKey);
/* disable background None for untrusted windows */
if ((requested & DixCreateAccess) && (rec->rtype == RT_WINDOW))
@@ -831,8 +830,11 @@ SecurityResource(CallbackListPtr *pcbl, pointer unused, pointer calldata)
allowed |= DixReadAccess;
}
- if (SecurityDoCheck(subj, obj, requested, allowed) == Success)
- return;
+ if (clients[cid] != NULL) {
+ obj = dixLookupPrivate(&clients[cid]->devPrivates, stateKey);
+ if (SecurityDoCheck(subj, obj, requested, allowed) == Success)
+ return;
+ }
SecurityAudit("Security: denied client %d access %x to resource 0x%x "
"of client %d on request %s\n", rec->client->index,
More information about the xorg-commit
mailing list