xserver: Branch 'server-1.9-branch' - 2 commits
Jeremy Huddleston
jeremyhu at kemper.freedesktop.org
Sat Sep 11 14:22:14 PDT 2010
dix/privates.c | 1 +
dix/property.c | 1 -
dix/selection.c | 3 +--
3 files changed, 2 insertions(+), 3 deletions(-)
New commits:
commit e615acf06feabd4de695d1237aa3891957428999
Author: Eamon Walsh <ewalsh at tycho.nsa.gov>
Date: Mon Aug 30 16:37:05 2010 -0400
Add screens to the PRIVATE_XSELINUX set.
The SELinux extension does store a security label in the screen
devPrivates. Fixes crash caused by overwriting another private.
Signed-off-by: Eamon Walsh <ewalsh at tycho.nsa.gov>
Reported-by: Justin Mattock <justinmattock at gmail.com>
Signed-off-by: Keith Packard <keithp at keithp.com>
(cherry picked from commit 9a1a4ccbe026f34beca5db3b2243874906961b49)
diff --git a/dix/privates.c b/dix/privates.c
index ec818d4..17e1050 100644
--- a/dix/privates.c
+++ b/dix/privates.c
@@ -71,6 +71,7 @@ static struct {
} keys[PRIVATE_LAST];
static const Bool xselinux_private[PRIVATE_LAST] = {
+ [PRIVATE_SCREEN] = TRUE,
[PRIVATE_CLIENT] = TRUE,
[PRIVATE_WINDOW] = TRUE,
[PRIVATE_PIXMAP] = TRUE,
commit ad62b2400907bf856ece615197066aad02503716
Author: Eamon Walsh <ewalsh at tycho.nsa.gov>
Date: Mon Aug 23 16:04:03 2010 -0400
Fix property and selection devPrivate allocation.
Selection objects were not being allocated with privates, and both
objects had a stray statement that zeroed out the devPrivates field.
Signed-off-by: Eamon Walsh <ewalsh at tycho.nsa.gov>
Reported-by: Justin Mattock <justinmattock at gmail.com>
Reviewed-by: Adam Jackson <ajax at redhat.com>
Signed-off-by: Keith Packard <keithp at keithp.com>
(cherry picked from commit 9ef6241c2382bfc555284a4985f6d1e37d750d6f)
diff --git a/dix/property.c b/dix/property.c
index 87e5c2d..1d4332a 100644
--- a/dix/property.c
+++ b/dix/property.c
@@ -284,7 +284,6 @@ dixChangeWindowProperty(ClientPtr pClient, WindowPtr pWin, Atom property,
pProp->format = format;
pProp->data = data;
pProp->size = len;
- pProp->devPrivates = NULL;
rc = XaceHookPropertyAccess(pClient, pWin, &pProp,
DixCreateAccess|DixWriteAccess);
if (rc != Success) {
diff --git a/dix/selection.c b/dix/selection.c
index bae3a30..87ed1ab 100644
--- a/dix/selection.c
+++ b/dix/selection.c
@@ -196,12 +196,11 @@ ProcSetSelectionOwner(ClientPtr client)
/*
* It doesn't exist, so add it...
*/
- pSel = malloc(sizeof(Selection));
+ pSel = dixAllocateObjectWithPrivates(Selection, PRIVATE_SELECTION);
if (!pSel)
return BadAlloc;
pSel->selection = stuff->selection;
- pSel->devPrivates = NULL;
/* security creation/labeling check */
rc = XaceHookSelectionAccess(client, &pSel,
More information about the xorg-commit
mailing list