summaryrefslogtreecommitdiff
path: root/Xext
AgeCommit message (Collapse)AuthorFilesLines
2009-07-17Xext: include securproto.h instead of securstr.hPeter Hutterer1-1/+1
Reported-by: Byeong-ryeol Kim Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-07-15Update to xextproto 7.0.99.1.Peter Hutterer8-20/+35
xextproto had Xlib client headers moved into libXext. Protocol header files are named fooproto.h, header files with constants foo.h or fooconst.h where foo.h was already in use for client-side headers.
2009-07-14Xext: switch to byte counting functionsPeter Hutterer12-51/+51
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-07-07The way XaceHook() mixes struct initializers and va_arg() is not portable andMichael Lorenz1-63/+53
gives bogus data on sparc and probably others leading to a crash. Fix: Don't use initializers, instead set each member directly to enforce order. Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov>
2009-07-06Xext: return BadValue for XTestFakeInput on unsupported capabilities.Peter Hutterer1-0/+23
Calling XTestFakeDevice*Event on a device that doesn't allow the matching event returns BadValue. Reported-by: Florian Echtler Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-07-06Xext: remove unused variable 'it'.Peter Hutterer1-2/+0
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-07-01input: store the master device's ID in the devPrivate for XTest devices.Peter Hutterer1-9/+1
Rather than storing a simple boolean in the devPrivate for XTest devices, store the actual master device's id (since it is constant for the life of the device anyway). Callers should use GetXtstDevice now instead of digging around in the devPrivates themselves. This patch allows for a cleanup in the creation of new master devices since GetMaster and GetXtstDevice spare the need for loops, IsPointer checks and similar. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Acked-by: Benjamin Close <Benjamin.Close@clearchain.com>
2009-06-26xselinux: ignore property hook calls with the new Post access mode bit set.Eamon Walsh1-0/+4
Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov>
2009-06-18xselinux: Add new device permissions for XI2.Eamon Walsh1-5/+5
Refects the ability of clients to add/remove devices and device properties. Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov>
2009-06-18xselinux: Move the security class mapping to the header file.Eamon Walsh2-26/+393
Take the mapping of DixAccess bits to Flask permissions, move it into the header file, break up the extremely long lines, and annotate the permission names with the bit being referenced. Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov>
2009-05-28Merge branch 'master' into xi2Peter Hutterer14-620/+657
Conflicts: Xext/geext.c Xi/chdevcur.c Xi/extgrbdev.c Xi/xiproperty.c configure.ac dix/ptrveloc.c hw/xfree86/common/xf86Config.c mi/mipointer.h test/input.c xkb/xkb.c
2009-05-22Input: rename DeviceIntRec->isMaster to ->type.Peter Hutterer1-1/+1
isMaster is not enough as long as we differ between master pointers and keyboard. With flexible device classes, the usual checks for whether a master device is a pointer (currently check for ->button, ->valuators or ->key) do not work as an SD may post an event through a master and mess this check up. Example, a device with valuators but no buttons would remove the button class from the VCP and thus result in the IsPointerDevice(inputInfo.pointer) == FALSE. This will become worse in the future when new device classes are introduced that aren't provided in the current system (e.g. a switch class). This patch replaces isMaster with "type", one of SLAVE, MASTER_POINTER and MASTER_KEYBOARD. All checks for dev->isMaster are replaced with an IsMaster(dev).
2009-05-11xselinux: Relax ownership restriction on SetSelectionUseContext.Eamon Walsh1-9/+0
Instead, clients should keep track of the selection instances they use.
2009-05-08Fix a couple off-by-one array boundary checks.Alan Coopersmith1-1/+1
Error: Write outside array bounds at Xext/geext.c:406 in function 'GEWindowSetMask' [Symbolic analysis] In array dereference of cli->nextSib[extension] with index 'extension' Array size is 128 elements (of 4 bytes each), index <= 128 Error: Buffer overflow at dix/events.c:592 in function 'SetMaskForEvent' [Symbolic analysis] In array dereference of filters[deviceid] with index 'deviceid' Array size is 20 elements (of 512 bytes each), index >= 0 and index <= 20 Error: Read buffer overflow at hw/xfree86/loader/loader.c:226 in function 'LoaderOpen' [Symbolic analysis] In array dereference of refCount[new_handle] with index 'new_handle' Array size is 256 elements (of 4 bytes each), index >= 1 and index <= 256 These bugs were found using the Parfait source code analysis tool. For more information see http://research.sun.com/projects/parfait Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> Signed-off-by: Adam Jackson <ajax@redhat.com> Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-05-05Xext: shut up compiler warnings in xtest.cPeter Hutterer1-2/+2
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-05-05Xext: return BadDevice from XTest if we don't have keys/buttons/valuators.Peter Hutterer1-0/+10
BadDevice is an XI error, but this cannot happen for core XTest fake input anyway since the device will be the matching virtual XTest slave device. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-05-05Xext: fix core Xtest button presses, don't call PickPointer.Peter Hutterer1-6/+0
We already did the device selection before, so dev should be the XTest virtual pointer. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-05-04Xext: shut up compiler warnings in xtest.cPeter Hutterer1-2/+2
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-05-04Xext: return BadDevice from XTest if we don't have keys/buttons/valuators.Peter Hutterer1-0/+10
BadDevice is an XI error, but this cannot happen for core XTest fake input anyway since the device will be the matching virtual XTest slave device. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-05-04Xext: fix core Xtest button presses, don't call PickPointer.Peter Hutterer1-6/+0
We already did the device selection before, so dev should be the XTest virtual pointer. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-04-29Fix most remaining deprecated resource lookups.Eamon Walsh13-611/+657
Callsites updated to use dixLookupResourceBy{Type,Class}. TODO: Audit access modes to make sure they reflect the usage.
2009-04-24Merge branch 'master' into xi2Peter Hutterer1-2/+13
Conflicts: Xi/chdevhier.c include/input.h
2009-04-24input: propagate XTst events through virtual slave devices.Benjamin Close1-2/+13
A XTest virtual slave device pair (kbd/ptr) exists for every master device pair. This is so XTest events are correctly propogated via slave devices up to Master devices and the classes are correctly changed along the way. We add the XTest slave device pair to the Virtual Core pointer and provide a simple way of creating the devices. A XTest Slave Device is identified by the XTstDevicePrivateKey property being set in the devices devProperties XI events are still propagated through the matching device, in the hope the client knows what it is doing. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-04-19Merge branch 'master' into xi2Peter Hutterer2-41/+73
2009-04-16security: Grant untrusted windows remove access on all windows.Eamon Walsh1-0/+5
This allows untrusted clients to destroy their own windows when they have been reparented by a trusted window manager.
2009-04-16security: Fix a crash caused by wrong ordering of format arguments.Eamon Walsh1-3/+4
2009-04-16security: Revert behavior of extension access for compatibility.Eamon Walsh1-14/+16
Previously, three extensions were defined as "trusted" by the extension: BIG-REQUESTS, XC-MISC, and XPrint. No other extensions were permitted to be used by untrusted clients. In commit 8b5d21cc1d1f4e9d20e5d5eca44cb1e60a419763 this was changed for some reason. Return to the old, compatible behavior.
2009-04-09xselinux: Don't BadAlloc in List* requests if there are no items to list.Eamon Walsh1-3/+3
2009-04-08xselinux: Don't require incoming context strings to be null-terminated.Eamon Walsh1-21/+45
2009-04-07Merge branch 'master' into xi2Peter Hutterer5-44/+23
2009-04-03Revert accidental Makefile change from previous commitAdam Jackson1-1/+1
2009-04-03DPMS: Re-export the various DPMS variables.Adam Jackson1-1/+1
The drivers might not need them but extmod does. Should move it to builtin though.
2009-04-03DPMS: Remove unused DPMSGet()Adam Jackson2-7/+0
2009-04-03DPMS: Code motion.Adam Jackson1-34/+8
2009-03-27selinux: Only activate if policy says to be an object managerAdam Jackson1-0/+4
2009-03-27Xext: set POINTER_SCREEN flag in XTestFakeInput if necessary. (RH #490984)Peter Hutterer1-3/+11
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>
2009-03-20Xext: remove ev_fill from GEExtensions.Peter Hutterer2-18/+4
2009-03-20Xext: purge XGE event masks.Peter Hutterer2-208/+0
The masks were originally designed to generically handle event masks for extensions. Since all that is in-server anyway, it's much better writing custom event masks for those extensions that need it and not providing a unified mechanism. XI2 needs more than the current implementation, which is already too complex for most other extensions. good riddance. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-03-16selinux: Add support for avc_acquire_netlink_fd()Adam Jackson1-0/+29
Requires libselinux 2.0.79 or newer. Without this, libselinux will check for policy updates on the netlink socket on basically every policy lookup. Statistically speaking, they never happen, and the check translates to at least one more syscall on basically every operation. Instead, take control of the fd from the library, and check it in WakeupHandler if it polls readable.
2009-03-09Replace dixLookupResource by dixLookupResourceBy{Type,Class}Keith Packard6-12/+12
dixLookupResource attempted to automatically detect whether the caller wanted a lookup by-type or by-class, unfortunately, it guessed wrong for RT_NONE. Instead of trying to make the guess better, this patch just reverts the unification and creates separate functions for each operation.
2009-03-03Fix 2 const warnings.Eamon Walsh1-1/+2
2009-03-03This patch changes all places in the X code to use _raw functions. TheEric Paris1-32/+32
X server should never see, translate, or deal with a munged context. Display managers which show contexts to the user should take care of translating these to human readable form.
2009-02-27selinux: Don't bother relabeling resources that are being destroyedAdam Jackson1-0/+2
Makes window destroy about 40x faster in Xvfb.
2009-02-23mi: split EQ popping and event processing into two functions.Peter Hutterer1-3/+1
mieqProcessInputEvents() - pop an event off the EQ and pass it to mieqProcessDeviceEvent() - process the event according to the MD/SD hierarchy. This way, we can use mieqPDE() from Xtest, xkb, and others to post an event. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-02-17xinerama: Put the proto version in the code instead using proto headers.Eric Anholt1-2/+4
Proto headers updating resulting in the server advertising new versions is broken. This should be applied to every extension. This fixes the build against slightly-older xineramaproto.
2009-02-16xserver: Avoid sending uninitialized padding data over the networkPeter Åstrand4-0/+5
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-02-13xext: Use proto header rather than the Xext include file, this prevents ↵Benjamin Close1-2/+1
userspace being pulled in causing issues Signed-off-by: Benjamin Close <Benjamin.Close@clearchain.com> Acked-by: Peter Hutterer <peter.hutterer@who-t.net> Acked-by: Daniel Stone <daniel@fooishbar.org>
2009-02-03Xext: fix typo in GEEventFill macroPeter Hutterer1-1/+1
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-02-03Xext: rename shape's EventType to ShapeEventType to avoid name clashing.Peter Hutterer1-8/+8
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-02-03Xext: rename saver's EventType to SaverEventType.Peter Hutterer1-5/+5
Avoid namespace clashing with the internal events. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>