xserver 1.6.1
This commit is contained in:
parent
6fbf6639d8
commit
18de5fa9bb
@ -1 +1 @@
|
||||
xorg-server-1.6.0.tar.bz2
|
||||
xorg-server-1.6.1.tar.bz2
|
||||
|
@ -1,8 +0,0 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?> <!-- -*- SGML -*- -->
|
||||
<deviceinfo version="0.2">
|
||||
<device>
|
||||
<match key="info.capabilities" contains="input.keyboard">
|
||||
<append key="info.callouts.add" type="strlist">fedora-setup-keyboard</append>
|
||||
</match>
|
||||
</device>
|
||||
</deviceinfo>
|
@ -1,48 +0,0 @@
|
||||
#!/usr/bin/env python
|
||||
# encoding: utf-8
|
||||
# vim: tabstop=4 expandtab autoindent shiftwidth=4 fileencoding=utf-8
|
||||
"""
|
||||
fedora-setup-keyboard.py
|
||||
|
||||
Written by Alexander D. Kanevskiy <kad@blackcatlinux.com>
|
||||
"""
|
||||
|
||||
import sys, os, dbus
|
||||
import rhpl.keyboard_models
|
||||
from rhpl.simpleconfig import SimpleConfigFile
|
||||
|
||||
KBDCONFIG = "/etc/sysconfig/keyboard"
|
||||
|
||||
def main():
|
||||
# Sanity checks
|
||||
if 'UDI' not in os.environ:
|
||||
sys.exit(1)
|
||||
if not os.access(KBDCONFIG, os.R_OK):
|
||||
sys.exit(0)
|
||||
# Read config
|
||||
kbd_config = SimpleConfigFile()
|
||||
kbd_config.read(KBDCONFIG)
|
||||
kbd_models = rhpl.keyboard_models.KeyboardModels().get_models()
|
||||
(layout, model, variant, options) = tuple(kbd_models.get(kbd_config.info.get('KEYTABLE',''), ['', '', '', '', ''])[1:])
|
||||
result_dict = { 'layout': layout, 'model': model, 'variant': variant, 'options': options }
|
||||
|
||||
# Now let's dbus fun begin
|
||||
if 'HALD_DIRECT_ADDR' in os.environ:
|
||||
bus = dbus.connection.Connection(os.environ['HALD_DIRECT_ADDR'])
|
||||
else:
|
||||
bus = dbus.SystemBus()
|
||||
kbd = dbus.Interface(bus.get_object("org.freedesktop.Hal", os.environ['UDI']), 'org.freedesktop.Hal.Device')
|
||||
for key in result_dict:
|
||||
# Respect user settings
|
||||
value = kbd_config.info.get(key.upper(), result_dict[key])
|
||||
if not value:
|
||||
try:
|
||||
kbd.RemoveProperty("input.xkb.%s" % key)
|
||||
except dbus.exceptions.DBusException:
|
||||
pass # key already not exist
|
||||
else:
|
||||
kbd.SetPropertyString("input.xkb.%s" % key, value)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
@ -3,3 +3,4 @@ xorg-x11-server-1_5_1-1_fc10:HEAD:xorg-x11-server-1.5.1-1.fc10.src.rpm:122219855
|
||||
xorg-x11-server-1_5_2-1_fc10:HEAD:xorg-x11-server-1.5.2-1.fc10.src.rpm:1223667007
|
||||
xorg-x11-server-1_5_3-1_fc10:HEAD:xorg-x11-server-1.5.3-1.fc10.src.rpm:1225918317
|
||||
xorg-x11-server-1_6_0-1_fc11:HEAD:xorg-x11-server-1.6.0-1.fc11.src.rpm:1235594175
|
||||
xorg-x11-server-1_6_1-1_fc11:HEAD:xorg-x11-server-1.6.1-1.fc11.src.rpm:1239742477
|
||||
|
2
sources
2
sources
@ -1 +1 @@
|
||||
aafe73f5807ce8bb534727ecb72467c7 xorg-server-1.6.0.tar.bz2
|
||||
ed0878bf32a24d4948c3b8a122a39eff xorg-server-1.6.1.tar.bz2
|
||||
|
@ -18,8 +18,8 @@
|
||||
|
||||
Summary: X.Org X11 X server
|
||||
Name: xorg-x11-server
|
||||
Version: 1.6.0
|
||||
Release: 20%{?dist}
|
||||
Version: 1.6.1
|
||||
Release: 1%{?dist}
|
||||
URL: http://www.x.org
|
||||
License: MIT
|
||||
Group: User Interface/X
|
||||
@ -56,9 +56,7 @@ Patch1003: xserver-1.4.99-pic-libxf86config.patch
|
||||
Patch2013: xserver-1.4.99-document-fontpath-correctly.patch
|
||||
Patch2014: xserver-1.5.0-projector-fb-size.patch
|
||||
|
||||
# Trivial things to never merge upstream ever
|
||||
# Don't merge this without protecting the gccisms.
|
||||
Patch5001: xserver-1.4.99-alloca-poison.patch
|
||||
# Trivial things to never merge upstream ever:
|
||||
# This really could be done prettier.
|
||||
Patch5002: xserver-1.4.99-ssh-isnt-local.patch
|
||||
|
||||
@ -85,7 +83,7 @@ Patch6012: xserver-1.5.99.902-sod-off-poulsbo.patch
|
||||
Patch6013: xserver-1.6.0-selinux-less.patch
|
||||
|
||||
# selinux performance hack
|
||||
Patch6014: xserver-1.6.0-selinux-nlfd.patch
|
||||
#Patch6014: xserver-1.6.0-selinux-nlfd.patch
|
||||
|
||||
# https://bugs.freedesktop.org/show_bug.cgi?id=20087
|
||||
Patch6015: xserver-1.5.99.902-vnc.patch
|
||||
@ -93,17 +91,9 @@ Patch6015: xserver-1.5.99.902-vnc.patch
|
||||
# Make autoconfiguration chose nouveau driver for NVIDIA GPUs
|
||||
Patch6016: xserver-1.5.99.902-nouveau.patch
|
||||
|
||||
# from master, may end up in 1.6.1.
|
||||
Patch6018: xserver-1.6.0-XIPropToInt.patch
|
||||
Patch6019: xserver-1.6.0-XATOM_FLOAT.patch
|
||||
Patch6020: xserver-1.6.0-preferred-thinko.patch
|
||||
Patch6021: xserver-1.6.0-selinux-raw.patch
|
||||
Patch6022: xserver-1.6.0-primary.patch
|
||||
Patch6023: xserver-1.6.0-selinux-destroy.patch
|
||||
|
||||
Patch6024: xserver-1.6.0-xinerama-cursors.patch
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=490984
|
||||
Patch6025: xserver-1.6.0-xtest-pointerscreen.patch
|
||||
# http://bugs.freedesktop.org/show_bug.cgi?id=20557
|
||||
Patch6026: xserver-1.6.0-xinerama-crashes.patch
|
||||
|
||||
@ -543,6 +533,9 @@ rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
|
||||
%changelog
|
||||
* Tue Apr 14 2009 Adam Jackson <ajax@redhat.com> 1.6.1-1
|
||||
- xserver 1.6.1
|
||||
|
||||
* Mon Apr 13 2009 Adam Jackson <ajax@redhat.com> 1.6.0-20
|
||||
- Obsolete a bunch of input drivers. (#493221)
|
||||
|
||||
|
@ -1,27 +0,0 @@
|
||||
From d8f0b7e388f61a9ae528466dafac1bdfaf5b77ca Mon Sep 17 00:00:00 2001
|
||||
From: Adam Jackson <ajax@redhat.com>
|
||||
Date: Mon, 10 Dec 2007 15:25:01 -0500
|
||||
Subject: [PATCH] Poison {DE,}ALLOCATE_LOCAL so we don't build broken drivers.
|
||||
|
||||
---
|
||||
include/os.h | 4 ++++
|
||||
1 files changed, 4 insertions(+), 0 deletions(-)
|
||||
|
||||
diff --git a/include/os.h b/include/os.h
|
||||
index c53a9ea..0960d0c 100644
|
||||
--- a/include/os.h
|
||||
+++ b/include/os.h
|
||||
@@ -50,6 +50,10 @@ SOFTWARE.
|
||||
#define OS_H
|
||||
|
||||
#include "misc.h"
|
||||
+
|
||||
+#pragma GCC poison ALLOCATE_LOCAL
|
||||
+#pragma GCC poison DEALLOCATE_LOCAL
|
||||
+
|
||||
#include <stdarg.h>
|
||||
|
||||
#define NullFID ((FID) 0)
|
||||
--
|
||||
1.5.2.4
|
||||
|
@ -1,123 +0,0 @@
|
||||
From a48c81dcdf569a3f634ac23e08d2491354de6a36 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Hutterer <peter.hutterer@who-t.net>
|
||||
Date: Fri, 5 Dec 2008 16:24:57 +1000
|
||||
Subject: [PATCH] Xi: add XATOM_FLOAT to server-defined properties.
|
||||
|
||||
This property is used to denote type float for input properties. Such
|
||||
properties can be accessed easily through the XIPropToFloat() function.
|
||||
|
||||
Code originally written by Simon Thum.
|
||||
|
||||
Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
|
||||
---
|
||||
Xi/xiproperty.c | 55 +++++++++++++++++++++++++++++++++++++++++-
|
||||
include/exevents.h | 6 ++++
|
||||
include/xserver-properties.h | 4 +++
|
||||
3 files changed, 64 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/Xi/xiproperty.c b/Xi/xiproperty.c
|
||||
index cd9805a..6da8424 100644
|
||||
--- a/Xi/xiproperty.c
|
||||
+++ b/Xi/xiproperty.c
|
||||
@@ -49,7 +49,8 @@ static struct dev_properties
|
||||
Atom type;
|
||||
char *name;
|
||||
} dev_properties[] = {
|
||||
- {0, XI_PROP_ENABLED}
|
||||
+ {0, XI_PROP_ENABLED},
|
||||
+ {0, XATOM_FLOAT}
|
||||
};
|
||||
|
||||
static long XIPropHandlerID = 1;
|
||||
@@ -137,6 +138,58 @@ XIPropToInt(XIPropertyValuePtr val, int *nelem_return, int **buf_return)
|
||||
return Success;
|
||||
}
|
||||
|
||||
+/**
|
||||
+ * Convert the given property's value(s) into @nelem_return float values and
|
||||
+ * store them in @buf_return. If @nelem_return is larger than the number of
|
||||
+ * values in the property, @nelem_return is set to the number of values in the
|
||||
+ * property.
|
||||
+ *
|
||||
+ * If *@buf_return is NULL and @nelem_return is 0, memory is allocated
|
||||
+ * automatically and must be freed by the caller.
|
||||
+ *
|
||||
+ * Possible errors returned:
|
||||
+ * Success
|
||||
+ * BadMatch ... Wrong atom type, atom is not XA_FLOAT
|
||||
+ * BadValue ... Wrong format, format is not 32
|
||||
+ * BadAlloc ... NULL passed as buffer and allocation failed.
|
||||
+ * BadLength ... @buff is NULL but @nelem_return is non-zero.
|
||||
+ *
|
||||
+ * @param val The property value
|
||||
+ * @param nelem_return The maximum number of elements to return.
|
||||
+ * @param buf_return Pointer to an array of at least @nelem_return values.
|
||||
+ * @return Success or the error code if an error occured.
|
||||
+ */
|
||||
+_X_EXPORT int
|
||||
+XIPropToFloat(XIPropertyValuePtr val, int *nelem_return, float **buf_return)
|
||||
+{
|
||||
+ int i;
|
||||
+ float *buf;
|
||||
+
|
||||
+ if (!val->type || val->type != XIGetKnownProperty(XATOM_FLOAT))
|
||||
+ return BadMatch;
|
||||
+
|
||||
+ if (val->format != 32)
|
||||
+ return BadValue;
|
||||
+ if (!*buf_return && *nelem_return)
|
||||
+ return BadLength;
|
||||
+
|
||||
+ buf = *buf_return;
|
||||
+
|
||||
+ if (!buf && !(*nelem_return))
|
||||
+ {
|
||||
+ buf = xcalloc(val->size, sizeof(float));
|
||||
+ if (!buf)
|
||||
+ return BadAlloc;
|
||||
+ *buf_return = buf;
|
||||
+ *nelem_return = val->size;
|
||||
+ } else if (val->size < *nelem_return)
|
||||
+ *nelem_return = val->size;
|
||||
+
|
||||
+ for (i = 0; i < val->size && i < *nelem_return; i++)
|
||||
+ buf[i] = ((float*)val->data)[i];
|
||||
+
|
||||
+ return Success;
|
||||
+}
|
||||
|
||||
/**
|
||||
* Init those properties that are allocated by the server and most likely used
|
||||
diff --git a/include/exevents.h b/include/exevents.h
|
||||
index 485347b..2504baf 100644
|
||||
--- a/include/exevents.h
|
||||
+++ b/include/exevents.h
|
||||
@@ -257,4 +257,10 @@ extern _X_EXPORT int XIPropToInt(
|
||||
int **buf_return
|
||||
);
|
||||
|
||||
+extern _X_EXPORT int XIPropToFloat(
|
||||
+ XIPropertyValuePtr val,
|
||||
+ int *nelem_return,
|
||||
+ float **buf_return
|
||||
+);
|
||||
+
|
||||
#endif /* EXEVENTS_H */
|
||||
diff --git a/include/xserver-properties.h b/include/xserver-properties.h
|
||||
index 4d602b5..f8aeab6 100644
|
||||
--- a/include/xserver-properties.h
|
||||
+++ b/include/xserver-properties.h
|
||||
@@ -26,6 +26,10 @@
|
||||
#ifndef _XSERVER_PROPERTIES_H_
|
||||
#define _XSERVER_PROPERTIES_H_
|
||||
|
||||
+/* Type for a 4 byte float. Storage format IEEE 754 in client's default
|
||||
+ * byte-ordering. */
|
||||
+#define XATOM_FLOAT "FLOAT"
|
||||
+
|
||||
/* BOOL. 0 - device disabled, 1 - device enabled */
|
||||
#define XI_PROP_ENABLED "Device Enabled"
|
||||
|
||||
--
|
||||
1.6.0.6
|
||||
|
@ -1,120 +0,0 @@
|
||||
From 669f6810af9a89187d6149841925fe765f3988ff Mon Sep 17 00:00:00 2001
|
||||
From: Peter Hutterer <peter.hutterer@redhat.com>
|
||||
Date: Wed, 19 Nov 2008 15:50:57 +1000
|
||||
Subject: [PATCH] Xi: add XIPropToInt() auxiliary function.
|
||||
|
||||
Converts an XIPropertyValuePtr to an integer, provided that type and format is
|
||||
right.
|
||||
|
||||
Code originally written by Simon Thum.
|
||||
|
||||
Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
|
||||
---
|
||||
Xi/xiproperty.c | 68 ++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
include/exevents.h | 6 ++++
|
||||
2 files changed, 74 insertions(+), 0 deletions(-)
|
||||
|
||||
diff --git a/Xi/xiproperty.c b/Xi/xiproperty.c
|
||||
index e79a2ed..cd9805a 100644
|
||||
--- a/Xi/xiproperty.c
|
||||
+++ b/Xi/xiproperty.c
|
||||
@@ -32,6 +32,7 @@
|
||||
#include "dix.h"
|
||||
#include "inputstr.h"
|
||||
#include <X11/extensions/XI.h>
|
||||
+#include <X11/Xatom.h>
|
||||
#include <X11/extensions/XIproto.h>
|
||||
#include "exglobals.h"
|
||||
#include "exevents.h"
|
||||
@@ -71,6 +72,73 @@ XIGetKnownProperty(char *name)
|
||||
}
|
||||
|
||||
/**
|
||||
+ * Convert the given property's value(s) into @nelem_return integer values and
|
||||
+ * store them in @buf_return. If @nelem_return is larger than the number of
|
||||
+ * values in the property, @nelem_return is set to the number of values in the
|
||||
+ * property.
|
||||
+ *
|
||||
+ * If *@buf_return is NULL and @nelem_return is 0, memory is allocated
|
||||
+ * automatically and must be freed by the caller.
|
||||
+ *
|
||||
+ * Possible return codes.
|
||||
+ * Success ... No error.
|
||||
+ * BadMatch ... Wrong atom type, atom is not XA_INTEGER
|
||||
+ * BadAlloc ... NULL passed as buffer and allocation failed.
|
||||
+ * BadLength ... @buff is NULL but @nelem_return is non-zero.
|
||||
+ *
|
||||
+ * @param val The property value
|
||||
+ * @param nelem_return The maximum number of elements to return.
|
||||
+ * @param buf_return Pointer to an array of at least @nelem_return values.
|
||||
+ * @return Success or the error code if an error occured.
|
||||
+ */
|
||||
+_X_EXPORT int
|
||||
+XIPropToInt(XIPropertyValuePtr val, int *nelem_return, int **buf_return)
|
||||
+{
|
||||
+ int i;
|
||||
+ int *buf;
|
||||
+
|
||||
+ if (val->type != XA_INTEGER)
|
||||
+ return BadMatch;
|
||||
+ if (!*buf_return && *nelem_return)
|
||||
+ return BadLength;
|
||||
+
|
||||
+ switch(val->format)
|
||||
+ {
|
||||
+ case 8:
|
||||
+ case 16:
|
||||
+ case 32:
|
||||
+ break;
|
||||
+ default:
|
||||
+ return BadValue;
|
||||
+ }
|
||||
+
|
||||
+ buf = *buf_return;
|
||||
+
|
||||
+ if (!buf && !(*nelem_return))
|
||||
+ {
|
||||
+ buf = xcalloc(val->size, sizeof(int));
|
||||
+ if (!buf)
|
||||
+ return BadAlloc;
|
||||
+ *buf_return = buf;
|
||||
+ *nelem_return = val->size;
|
||||
+ } else if (val->size < *nelem_return)
|
||||
+ *nelem_return = val->size;
|
||||
+
|
||||
+ for (i = 0; i < val->size && i < *nelem_return; i++)
|
||||
+ {
|
||||
+ switch(val->format)
|
||||
+ {
|
||||
+ case 8: buf[i] = ((CARD8*)val->data)[i]; break;
|
||||
+ case 16: buf[i] = ((CARD16*)val->data)[i]; break;
|
||||
+ case 32: buf[i] = ((CARD32*)val->data)[i]; break;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ return Success;
|
||||
+}
|
||||
+
|
||||
+
|
||||
+/**
|
||||
* Init those properties that are allocated by the server and most likely used
|
||||
* by the DIX or the DDX.
|
||||
*/
|
||||
diff --git a/include/exevents.h b/include/exevents.h
|
||||
index 2a7ec97..485347b 100644
|
||||
--- a/include/exevents.h
|
||||
+++ b/include/exevents.h
|
||||
@@ -251,4 +251,10 @@ extern _X_EXPORT Atom XIGetKnownProperty(
|
||||
|
||||
extern DeviceIntPtr XIGetDevice(xEvent *ev);
|
||||
|
||||
+extern _X_EXPORT int XIPropToInt(
|
||||
+ XIPropertyValuePtr val,
|
||||
+ int *nelem_return,
|
||||
+ int **buf_return
|
||||
+);
|
||||
+
|
||||
#endif /* EXEVENTS_H */
|
||||
--
|
||||
1.6.0.6
|
||||
|
@ -1,28 +0,0 @@
|
||||
From 33c791b421db742e78c74028a5ef5f6604e66c48 Mon Sep 17 00:00:00 2001
|
||||
From: Adam Jackson <ajax@redhat.com>
|
||||
Date: Mon, 2 Mar 2009 13:00:31 -0500
|
||||
Subject: [PATCH] Fix output setup when only one head, and it's not the zeroth one.
|
||||
|
||||
---
|
||||
hw/xfree86/modes/xf86Crtc.c | 4 ++--
|
||||
1 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c
|
||||
index a8fd099..ad6ca98 100644
|
||||
--- a/hw/xfree86/modes/xf86Crtc.c
|
||||
+++ b/hw/xfree86/modes/xf86Crtc.c
|
||||
@@ -2070,9 +2070,9 @@ xf86TargetPreferred(ScrnInfoPtr scrn, xf86CrtcConfigPtr config,
|
||||
(float)config->output[p]->mm_height;
|
||||
|
||||
if (aspect)
|
||||
- preferred_match[0] = bestModeForAspect(config, enabled, aspect);
|
||||
+ preferred_match[p] = bestModeForAspect(config, enabled, aspect);
|
||||
|
||||
- if (preferred_match[0])
|
||||
+ if (preferred_match[p])
|
||||
ret = TRUE;
|
||||
|
||||
} while (0);
|
||||
--
|
||||
1.6.1.3
|
||||
|
@ -1,25 +0,0 @@
|
||||
From 00fb367cffcc6dd36e5c023757414ed63e13e643 Mon Sep 17 00:00:00 2001
|
||||
From: Adam Jackson <ajax@redhat.com>
|
||||
Date: Tue, 3 Mar 2009 14:32:52 -0500
|
||||
Subject: [PATCH] Don't bother relabeling resources that are being destroyed
|
||||
|
||||
---
|
||||
Xext/xselinux.c | 2 ++
|
||||
1 files changed, 2 insertions(+), 0 deletions(-)
|
||||
|
||||
diff --git a/Xext/xselinux.c b/Xext/xselinux.c
|
||||
index 6085983..f8495ea 100644
|
||||
--- a/Xext/xselinux.c
|
||||
+++ b/Xext/xselinux.c
|
||||
@@ -1150,6 +1150,8 @@ SELinuxResourceState(CallbackListPtr *pcbl, pointer unused, pointer calldata)
|
||||
|
||||
if (rec->type != RT_WINDOW)
|
||||
return;
|
||||
+ if (rec->state != ResourceStateAdding)
|
||||
+ return;
|
||||
|
||||
pWin = (WindowPtr)rec->value;
|
||||
subj = dixLookupPrivate(&wClient(pWin)->devPrivates, subjectKey);
|
||||
--
|
||||
1.6.1.3
|
||||
|
@ -1,94 +0,0 @@
|
||||
From 0731394b205f003143ceec1bde04b6c6726f9c10 Mon Sep 17 00:00:00 2001
|
||||
From: Adam Jackson <ajax@redhat.com>
|
||||
Date: Mon, 2 Mar 2009 18:45:27 -0500
|
||||
Subject: [PATCH] selinux netlink socket hack
|
||||
|
||||
---
|
||||
Xext/xselinux.c | 29 +++++++++++++++++++++++++++++
|
||||
configure.ac | 4 ++++
|
||||
include/dix-config.h.in | 2 ++
|
||||
3 files changed, 35 insertions(+), 0 deletions(-)
|
||||
|
||||
diff --git a/Xext/xselinux.c b/Xext/xselinux.c
|
||||
index 6085983..419c0ae 100644
|
||||
--- a/Xext/xselinux.c
|
||||
+++ b/Xext/xselinux.c
|
||||
@@ -1887,6 +1887,22 @@ SProcSELinuxDispatch(ClientPtr client)
|
||||
}
|
||||
}
|
||||
|
||||
+#ifdef HAVE_AVC_NETLINK_ACQUIRE_FD
|
||||
+static int netlink_fd;
|
||||
+
|
||||
+static void
|
||||
+SELinuxBlockHandler(void *data, struct timeval **tv, void *read_mask)
|
||||
+{
|
||||
+}
|
||||
+
|
||||
+static void
|
||||
+SELinuxWakeupHandler(void *data, int err, void *read_mask)
|
||||
+{
|
||||
+ if (FD_ISSET(netlink_fd, (fd_set *)read_mask))
|
||||
+ avc_netlink_check_nb();
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
|
||||
/*
|
||||
* Extension Setup / Teardown
|
||||
@@ -1917,6 +1933,12 @@ SELinuxResetProc(ExtensionEntry *extEntry)
|
||||
label_hnd = NULL;
|
||||
|
||||
audit_close(audit_fd);
|
||||
+#ifdef HAVE_AVC_NETLINK_ACQUIRE_FD
|
||||
+ avc_netlink_release_fd();
|
||||
+ RemoveBlockAndWakeupHandlers(SELinuxBlockHandler, SELinuxWakeupHandler,
|
||||
+ NULL);
|
||||
+ RemoveGeneralSocket(netlink_fd);
|
||||
+#endif
|
||||
|
||||
avc_destroy();
|
||||
avc_active = 0;
|
||||
@@ -2013,6 +2035,13 @@ SELinuxExtensionInit(INITARGS)
|
||||
if (atom_client_ctx == BAD_RESOURCE)
|
||||
FatalError("SELinux: Failed to create atom\n");
|
||||
|
||||
+#ifdef HAVE_AVC_NETLINK_ACQUIRE_FD
|
||||
+ netlink_fd = avc_netlink_acquire_fd();
|
||||
+ AddGeneralSocket(netlink_fd);
|
||||
+ RegisterBlockAndWakeupHandlers(SELinuxBlockHandler, SELinuxWakeupHandler,
|
||||
+ NULL);
|
||||
+#endif
|
||||
+
|
||||
/* Register callbacks */
|
||||
ret &= dixRegisterPrivateInitFunc(subjectKey, SELinuxSubjectInit, NULL);
|
||||
ret &= dixRegisterPrivateDeleteFunc(subjectKey, SELinuxSubjectFree, NULL);
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 72ae67e..55a880e 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -920,6 +920,10 @@ if test "x$XSELINUX" = xyes; then
|
||||
AC_CHECK_LIB(selinux, avc_init, [], AC_MSG_ERROR([SELinux library not found]))
|
||||
AC_CHECK_HEADERS([libaudit.h], [], AC_MSG_ERROR([SELinux extension requires audit system headers]))
|
||||
AC_CHECK_LIB(audit, audit_open, [], AC_MSG_ERROR([SELinux extension requires audit system library]))
|
||||
+ AC_CHECK_DECL(avc_netlink_acquire_fd,
|
||||
+ [AC_DEFINE(HAVE_AVC_NETLINK_ACQUIRE_FD, 1, "Have avc_netlink_acquire_fd")],
|
||||
+ [],
|
||||
+ [#include <selinux/avc.h>])
|
||||
AC_DEFINE(XSELINUX, 1, [Build SELinux extension])
|
||||
SELINUX_LIB="-lselinux -laudit"
|
||||
fi
|
||||
diff --git a/include/dix-config.h.in b/include/dix-config.h.in
|
||||
index 3da193f..66c3008 100644
|
||||
--- a/include/dix-config.h.in
|
||||
+++ b/include/dix-config.h.in
|
||||
@@ -442,4 +442,6 @@
|
||||
#include "dix-config-apple-verbatim.h"
|
||||
#endif
|
||||
|
||||
+#undef HAVE_AVC_NETLINK_ACQUIRE_FD
|
||||
+
|
||||
#endif /* _DIX_CONFIG_H_ */
|
||||
--
|
||||
1.6.1.3
|
||||
|
@ -1,225 +0,0 @@
|
||||
From 252522d2caa87dbfb510436a56332bd6e86b1a96 Mon Sep 17 00:00:00 2001
|
||||
From: Adam Jackson <ajax@redhat.com>
|
||||
Date: Mon, 2 Mar 2009 18:31:18 -0500
|
||||
Subject: [PATCH] selinux raw patch
|
||||
|
||||
---
|
||||
Xext/xselinux.c | 64 +++++++++++++++++++++++++++---------------------------
|
||||
1 files changed, 32 insertions(+), 32 deletions(-)
|
||||
|
||||
diff --git a/Xext/xselinux.c b/Xext/xselinux.c
|
||||
index 8e026be..6085983 100644
|
||||
--- a/Xext/xselinux.c
|
||||
+++ b/Xext/xselinux.c
|
||||
@@ -186,19 +186,19 @@ SELinuxAtomToSIDLookup(Atom atom, SELinuxObjectRec *obj, int map, int polymap)
|
||||
obj->poly = 1;
|
||||
|
||||
/* Look in the mappings of names to contexts */
|
||||
- if (selabel_lookup(label_hnd, &ctx, name, map) == 0) {
|
||||
+ if (selabel_lookup_raw(label_hnd, &ctx, name, map) == 0) {
|
||||
obj->poly = 0;
|
||||
} else if (errno != ENOENT) {
|
||||
ErrorF("SELinux: a property label lookup failed!\n");
|
||||
return BadValue;
|
||||
- } else if (selabel_lookup(label_hnd, &ctx, name, polymap) < 0) {
|
||||
+ } else if (selabel_lookup_raw(label_hnd, &ctx, name, polymap) < 0) {
|
||||
ErrorF("SELinux: a property label lookup failed!\n");
|
||||
return BadValue;
|
||||
}
|
||||
|
||||
/* Get a SID for context */
|
||||
- if (avc_context_to_sid(ctx, &obj->sid) < 0) {
|
||||
- ErrorF("SELinux: a context_to_SID call failed!\n");
|
||||
+ if (avc_context_to_sid_raw(ctx, &obj->sid) < 0) {
|
||||
+ ErrorF("SELinux: a context_to_SID_raw call failed!\n");
|
||||
rc = BadAlloc;
|
||||
}
|
||||
|
||||
@@ -343,7 +343,7 @@ SELinuxEventToSID(unsigned type, security_id_t sid_of_window,
|
||||
SELinuxObjectRec *sid_return)
|
||||
{
|
||||
const char *name = LookupEventName(type);
|
||||
- security_context_t con;
|
||||
+ security_context_t ctx;
|
||||
type &= 127;
|
||||
|
||||
if (type >= numKnownEvents) {
|
||||
@@ -359,16 +359,16 @@ SELinuxEventToSID(unsigned type, security_id_t sid_of_window,
|
||||
|
||||
if (!knownEvents[type]) {
|
||||
/* Look in the mappings of event names to contexts */
|
||||
- if (selabel_lookup(label_hnd, &con, name, SELABEL_X_EVENT) < 0) {
|
||||
+ if (selabel_lookup_raw(label_hnd, &ctx, name, SELABEL_X_EVENT) < 0) {
|
||||
ErrorF("SELinux: an event label lookup failed!\n");
|
||||
return BadValue;
|
||||
}
|
||||
/* Get a SID for context */
|
||||
- if (avc_context_to_sid(con, knownEvents + type) < 0) {
|
||||
- ErrorF("SELinux: a context_to_SID call failed!\n");
|
||||
+ if (avc_context_to_sid_raw(ctx, knownEvents + type) < 0) {
|
||||
+ ErrorF("SELinux: a context_to_SID_raw call failed!\n");
|
||||
return BadAlloc;
|
||||
}
|
||||
- freecon(con);
|
||||
+ freecon(ctx);
|
||||
}
|
||||
|
||||
/* Perform a transition to obtain the final SID */
|
||||
@@ -474,7 +474,7 @@ SELinuxLabelClient(ClientPtr client)
|
||||
/* Try to get a context from the socket */
|
||||
if (fd < 0 || getpeercon_raw(fd, &ctx) < 0) {
|
||||
/* Otherwise, fall back to a default context */
|
||||
- if (selabel_lookup(label_hnd, &ctx, "remote", SELABEL_X_CLIENT) < 0)
|
||||
+ if (selabel_lookup_raw(label_hnd, &ctx, "remote", SELABEL_X_CLIENT) < 0)
|
||||
FatalError("SELinux: failed to look up remote-client context\n");
|
||||
}
|
||||
|
||||
@@ -509,8 +509,8 @@ SELinuxLabelClient(ClientPtr client)
|
||||
|
||||
finish:
|
||||
/* Get a SID from the context */
|
||||
- if (avc_context_to_sid(ctx, &subj->sid) < 0)
|
||||
- FatalError("SELinux: client %d: context_to_sid(%s) failed\n",
|
||||
+ if (avc_context_to_sid_raw(ctx, &subj->sid) < 0)
|
||||
+ FatalError("SELinux: client %d: context_to_sid_raw(%s) failed\n",
|
||||
client->index, ctx);
|
||||
|
||||
sidget(obj->sid = subj->sid);
|
||||
@@ -541,7 +541,7 @@ SELinuxLabelInitial(void)
|
||||
FatalError("SELinux: couldn't get context of X server process\n");
|
||||
|
||||
/* Get a SID from the context */
|
||||
- if (avc_context_to_sid(ctx, &subj->sid) < 0)
|
||||
+ if (avc_context_to_sid_raw(ctx, &subj->sid) < 0)
|
||||
FatalError("SELinux: serverClient: context_to_sid(%s) failed\n", ctx);
|
||||
|
||||
sidget(obj->sid = subj->sid);
|
||||
@@ -827,20 +827,20 @@ SELinuxExtension(CallbackListPtr *pcbl, pointer unused, pointer calldata)
|
||||
/* XXX there should be a separate callback for this */
|
||||
if (obj->sid == unlabeled_sid) {
|
||||
const char *name = rec->ext->name;
|
||||
- security_context_t con;
|
||||
+ security_context_t ctx;
|
||||
security_id_t sid;
|
||||
|
||||
serv = dixLookupPrivate(&serverClient->devPrivates, subjectKey);
|
||||
|
||||
/* Look in the mappings of extension names to contexts */
|
||||
- if (selabel_lookup(label_hnd, &con, name, SELABEL_X_EXT) < 0) {
|
||||
+ if (selabel_lookup_raw(label_hnd, &ctx, name, SELABEL_X_EXT) < 0) {
|
||||
ErrorF("SELinux: a property label lookup failed!\n");
|
||||
rec->status = BadValue;
|
||||
return;
|
||||
}
|
||||
/* Get a SID for context */
|
||||
- if (avc_context_to_sid(con, &sid) < 0) {
|
||||
- ErrorF("SELinux: a context_to_SID call failed!\n");
|
||||
+ if (avc_context_to_sid_raw(ctx, &sid) < 0) {
|
||||
+ ErrorF("SELinux: a context_to_SID_raw call failed!\n");
|
||||
rec->status = BadAlloc;
|
||||
return;
|
||||
}
|
||||
@@ -851,11 +851,11 @@ SELinuxExtension(CallbackListPtr *pcbl, pointer unused, pointer calldata)
|
||||
if (avc_compute_create(serv->sid, sid, SECCLASS_X_EXTENSION,
|
||||
&obj->sid) < 0) {
|
||||
ErrorF("SELinux: a SID transition call failed!\n");
|
||||
- freecon(con);
|
||||
+ freecon(ctx);
|
||||
rec->status = BadValue;
|
||||
return;
|
||||
}
|
||||
- freecon(con);
|
||||
+ freecon(ctx);
|
||||
}
|
||||
|
||||
/* Perform the security check */
|
||||
@@ -1156,7 +1156,7 @@ SELinuxResourceState(CallbackListPtr *pcbl, pointer unused, pointer calldata)
|
||||
|
||||
if (subj->sid) {
|
||||
security_context_t ctx;
|
||||
- int rc = avc_sid_to_context(subj->sid, &ctx);
|
||||
+ int rc = avc_sid_to_context_raw(subj->sid, &ctx);
|
||||
if (rc < 0)
|
||||
FatalError("SELinux: Failed to get security context!\n");
|
||||
rc = dixChangeWindowProperty(serverClient,
|
||||
@@ -1172,7 +1172,7 @@ SELinuxResourceState(CallbackListPtr *pcbl, pointer unused, pointer calldata)
|
||||
|
||||
if (obj->sid) {
|
||||
security_context_t ctx;
|
||||
- int rc = avc_sid_to_context(obj->sid, &ctx);
|
||||
+ int rc = avc_sid_to_context_raw(obj->sid, &ctx);
|
||||
if (rc < 0)
|
||||
FatalError("SELinux: Failed to get security context!\n");
|
||||
rc = dixChangeWindowProperty(serverClient,
|
||||
@@ -1288,7 +1288,7 @@ SELinuxSendContextReply(ClientPtr client, security_id_t sid)
|
||||
int len = 0;
|
||||
|
||||
if (sid) {
|
||||
- if (avc_sid_to_context(sid, &ctx) < 0)
|
||||
+ if (avc_sid_to_context_raw(sid, &ctx) < 0)
|
||||
return BadValue;
|
||||
len = strlen(ctx) + 1;
|
||||
}
|
||||
@@ -1347,9 +1347,9 @@ ProcSELinuxSetCreateContext(ClientPtr client, unsigned offset)
|
||||
*pSid = NULL;
|
||||
|
||||
if (stuff->context_len > 0) {
|
||||
- if (security_check_context(ctx) < 0)
|
||||
+ if (security_check_context_raw(ctx) < 0)
|
||||
return BadValue;
|
||||
- if (avc_context_to_sid(ctx, pSid) < 0)
|
||||
+ if (avc_context_to_sid_raw(ctx, pSid) < 0)
|
||||
return BadValue;
|
||||
}
|
||||
return Success;
|
||||
@@ -1393,9 +1393,9 @@ ProcSELinuxSetDeviceContext(ClientPtr client)
|
||||
if (rc != Success)
|
||||
return rc;
|
||||
|
||||
- if (security_check_context(ctx) < 0)
|
||||
+ if (security_check_context_raw(ctx) < 0)
|
||||
return BadValue;
|
||||
- if (avc_context_to_sid(ctx, &sid) < 0)
|
||||
+ if (avc_context_to_sid_raw(ctx, &sid) < 0)
|
||||
return BadValue;
|
||||
|
||||
subj = dixLookupPrivate(&dev->devPrivates, subjectKey);
|
||||
@@ -1511,9 +1511,9 @@ SELinuxPopulateItem(SELinuxListItemRec *i, PrivateRec **privPtr, CARD32 id,
|
||||
SELinuxObjectRec *obj = dixLookupPrivate(privPtr, objectKey);
|
||||
SELinuxObjectRec *data = dixLookupPrivate(privPtr, dataKey);
|
||||
|
||||
- if (avc_sid_to_context(obj->sid, &i->octx) < 0)
|
||||
+ if (avc_sid_to_context_raw(obj->sid, &i->octx) < 0)
|
||||
return BadValue;
|
||||
- if (avc_sid_to_context(data->sid, &i->dctx) < 0)
|
||||
+ if (avc_sid_to_context_raw(data->sid, &i->dctx) < 0)
|
||||
return BadValue;
|
||||
|
||||
i->id = id;
|
||||
@@ -1941,7 +1941,7 @@ SELinuxExtensionInit(INITARGS)
|
||||
ExtensionEntry *extEntry;
|
||||
struct selinux_opt selabel_option = { SELABEL_OPT_VALIDATE, (char *)1 };
|
||||
struct selinux_opt avc_option = { AVC_OPT_SETENFORCE, (char *)0 };
|
||||
- security_context_t con;
|
||||
+ security_context_t ctx;
|
||||
int ret = TRUE;
|
||||
|
||||
/* Check SELinux mode on system */
|
||||
@@ -1988,11 +1988,11 @@ SELinuxExtensionInit(INITARGS)
|
||||
if (!label_hnd)
|
||||
FatalError("SELinux: Failed to open x_contexts mapping in policy\n");
|
||||
|
||||
- if (security_get_initial_context("unlabeled", &con) < 0)
|
||||
+ if (security_get_initial_context_raw("unlabeled", &ctx) < 0)
|
||||
FatalError("SELinux: Failed to look up unlabeled context\n");
|
||||
- if (avc_context_to_sid(con, &unlabeled_sid) < 0)
|
||||
+ if (avc_context_to_sid_raw(ctx, &unlabeled_sid) < 0)
|
||||
FatalError("SELinux: a context_to_SID call failed!\n");
|
||||
- freecon(con);
|
||||
+ freecon(ctx);
|
||||
|
||||
/* Prepare for auditing */
|
||||
audit_fd = audit_open();
|
||||
--
|
||||
1.6.1.3
|
||||
|
@ -1,73 +0,0 @@
|
||||
From c3e5af42be915b27056644c2df6a4ce30b4ab5f3 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Hutterer <peter.hutterer@who-t.net>
|
||||
Date: Wed, 25 Mar 2009 15:51:43 +1000
|
||||
Subject: [PATCH] Xext: set POINTER_SCREEN flag in XTestFakeInput if necessary. (RH #490984)
|
||||
|
||||
The POINTER_SCREEN flag must be set explicitly for XTest core events to avoid
|
||||
out-of-range events when the lastSlave was an SD with an explicit axis range.
|
||||
Device events sent through XTest don't need this flag, they are expected to be
|
||||
in the valuator range of the device anyway.
|
||||
|
||||
Red Hat Bug 490984 <https://bugzilla.redhat.com/show_bug.cgi?id=490984>
|
||||
|
||||
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
||||
---
|
||||
Xext/xtest.c | 14 +++++++++++---
|
||||
1 files changed, 11 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/Xext/xtest.c b/Xext/xtest.c
|
||||
index a7f3830..3ff02ed 100644
|
||||
--- a/Xext/xtest.c
|
||||
+++ b/Xext/xtest.c
|
||||
@@ -161,6 +161,7 @@ ProcXTestFakeInput(client)
|
||||
int nevents;
|
||||
int i;
|
||||
int base = 0;
|
||||
+ int flags = 0;
|
||||
|
||||
nev = (stuff->length << 2) - sizeof(xReq);
|
||||
if ((nev % sizeof(xEvent)) || !nev)
|
||||
@@ -211,8 +212,14 @@ ProcXTestFakeInput(client)
|
||||
client->errorValue = ev->u.u.type;
|
||||
return BadValue;
|
||||
}
|
||||
+
|
||||
+ if (ev->u.u.detail == xFalse)
|
||||
+ flags |= POINTER_ABSOLUTE;
|
||||
} else
|
||||
+ {
|
||||
firstValuator = 0;
|
||||
+ flags |= POINTER_ABSOLUTE;
|
||||
+ }
|
||||
|
||||
if (nev == 1 && type == XI_DeviceMotionNotify && !dev->valuator)
|
||||
{
|
||||
@@ -281,6 +288,8 @@ ProcXTestFakeInput(client)
|
||||
valuators[1] = ev->u.keyButtonPointer.rootY;
|
||||
numValuators = 2;
|
||||
firstValuator = 0;
|
||||
+ if (ev->u.u.detail == xFalse)
|
||||
+ flags = POINTER_ABSOLUTE | POINTER_SCREEN;
|
||||
break;
|
||||
default:
|
||||
client->errorValue = ev->u.u.type;
|
||||
@@ -378,14 +387,13 @@ ProcXTestFakeInput(client)
|
||||
GetEventList(&events);
|
||||
switch(type) {
|
||||
case MotionNotify:
|
||||
- nevents = GetPointerEvents(events, dev, type, 0,
|
||||
- (ev->u.u.detail == xFalse) ? POINTER_ABSOLUTE : 0,
|
||||
+ nevents = GetPointerEvents(events, dev, type, 0, flags,
|
||||
firstValuator, numValuators, valuators);
|
||||
break;
|
||||
case ButtonPress:
|
||||
case ButtonRelease:
|
||||
nevents = GetPointerEvents(events, dev, type, ev->u.u.detail,
|
||||
- POINTER_ABSOLUTE, firstValuator,
|
||||
+ flags, firstValuator,
|
||||
numValuators, valuators);
|
||||
break;
|
||||
case KeyPress:
|
||||
--
|
||||
1.6.0.6
|
||||
|
Loading…
Reference in New Issue
Block a user