summaryrefslogtreecommitdiff
path: root/Xext
AgeCommit message (Collapse)AuthorFilesLines
2009-10-14xselinux: Use the now-exported IsPointerDevice() instead of a copy.Eamon Walsh1-11/+1
Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov>
2009-10-14xselinux: switch from x_device to separate x_pointer and x_keyboard classes.Eamon Walsh2-9/+51
This will allow separate controls over pointer and keyboard without having to relabel the devices to separate types. Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov>
2009-10-14xselinux: Stop special-casing QueryPointer access checks.Eamon Walsh1-11/+0
XACE has been changed to not return BadAccess on device read failures. Thus, no need for this workaround code. Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov>
2009-10-14xselinux: Factor out some dynamic array code into common helpers.Eamon Walsh1-78/+95
Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov>
2009-10-14xselinux: refactor extension code into smaller files.Eamon Walsh6-1465/+1642
New files: xselinux_ext.c: Extension init and request handlers. xselinux_hooks.c: XACE hook functions and other callbacks. xselinux_label.c: Object security-labeling code. xselinuxint.h: Shared internal functions. Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov>
2009-10-08Cast small-int values through intptr_t when passed as pointersJamey Sharp1-3/+3
On 64-bit systems, int and pointers don't have the same size, so GCC gives warnings about casts between int and pointer types. However, in the cases covered by this patch, it's always a value that fits in int being stored temporarily as a pointer and then converted back later, which is safe. Casting through the pointer-sized integer type intptr_t convinces the compiler that this is OK. Signed-off-by: Jamey Sharp <jamey@minilop.net> Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2009-10-08Remove static MAXSCREENS limit from Xext/shm.cJamey Sharp1-18/+61
Dynamically allocate per-screen data in the SHM extension, instead of having a single static-sized array. Signed-off-by: Jamey Sharp <jamey@minilop.net> Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2009-10-07Fix overlay detection when matching Xv adaptors across screens.Jamey Sharp1-1/+1
Signed-off-by: Jamey Sharp <jamey@minilop.net> Acked-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2009-09-29Fix ShmPutImage non-ZPixmap case.Michel Dänzer1-9/+34
Fixes http://bugs.freedesktop.org/show_bug.cgi?id=23298 .
2009-09-22Xext: switch mbuf.c to dixLookupResourceByTypePeter Hutterer1-13/+23
Resolves a linker error caused by LookupIDByType. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-09-22Xext: remove DisplayImageBuffers from mbuf.cPeter Hutterer1-36/+0
Not referenced by anything. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-09-22Xext: fix up multibuffer compiler errors.Peter Hutterer1-2/+248
Triggered by the xextproto 7.1 change, fixed by moving the matching declarations from the header file to here. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-09-21input: define server-supported protocol versions in one single file.Peter Hutterer10-25/+28
include/protocol-versions.h specifies each extension version as supported by the server and sent back on the wire to the client. This fixes up several issues with the server potentially reporting a higher version of the protocol if recompiled against a newer version of the protocol. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Acked-by: Rémi Cardona <remi@gentoo.org> Acked-by: Julien Cristau <jcristau@debian.org>
2009-09-21Xext: silence 'warning: no previous prototype' for sync, bigreq and xcmisc.Peter Hutterer3-0/+5
xcmisc and bigreq don't have their own header so just declare it here to shut up the compiler. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-09-20Xext: include security protocol header instead of client headerThomas Jaeger1-1/+1
Signed-off-by: Thomas Jaeger <ThJaeger@gmail.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-09-10Xext: don't try to initialize XTEST device properties if they failed.Peter Hutterer1-11/+11
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-09-02Correct outdated e-mail address in "Author" statements.Eamon Walsh5-5/+5
Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov>
2009-09-01Xext: fix a typo for bigreqsproto.h header fileJerome Glisse1-1/+1
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2009-08-31Xext: Require newer versions of xcmiscproto, bigreqsproto, and ↵Jeremy Huddleston3-4/+3
xf86bigfontproto for new *proto.h header file names bigreqsproto >= 1.1.0 xcmiscproto >= 1.2.0 xf86bigfontproto >= 1.2.0
2009-08-27Xext: rename Xtst* to XTest*Peter Hutterer1-43/+43
This patch corrects a misnaming of XTest-related functions. The extension itself announces itself as XTEST. Xtst is the library name itself, but all library functions are prefixed by XTest. Same with the naming in the server. - Rename all *Xtst* functions to *XTest* for consistency with the library and in-server API. - Rename the "Xtst device" property to "XTEST device" for consistency with the extension naming. - Rename the device naming to "<master device name> XTEST device". The default xtest devices become "Virtual core XTEST pointer" and "Virtual core XTEST keyboard". Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-08-27input: move XTest device initialization into Xext/xtest.cPeter Hutterer1-0/+142
XTest devices are non-optional but nonetheless specific to the XTEST extension. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-08-24Xext: remove un-used extern of DeviceMotionNotify.Peter Hutterer1-1/+0
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-08-17xselinux: Allow per-client device create contexts.Eamon Walsh1-9/+1
The previous behavior was to set the serverClient's value which was used globally. This is in support of XI2, where clients can create device pairs directly. Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov>
2009-08-17xselinux: Add more new device permissions for XI2.Eamon Walsh1-2/+2
Reflects the ability of clients to create/destroy device objects. Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov>
2009-08-17Don't reset the lastDeviceEventTime when doing DPMS actionsRichard Hughes1-13/+4
When we change the DPMS mode, don't play games with the last event time as this breaks applications using IDLETIME to turn the backlight off after a preset time. This patch fixes gnome-power-manager and xfce-power-manager Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-08-14Xext: fix up wrong conditions for negative sync transitions.Peter Hutterer1-18/+14
If the counter had a value higher than the trigger value for a negative transition, the trigger value did not get set. The correct sequence of checks is: if (positive transition) if (counter value < trigger value) set up trigger if (negative transition) if (counter value > trigger value) set up trigger Red Hat Bug 501601 <https://bugzilla.redhat.com/show_bug.cgi?id=501601> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-08-13Xext: add missing return code check to ProcSyncDestroyAlarmPeter Hutterer1-0/+1
Introduced with 57aff88c7d0761e590806d07bee1c9410680c89f. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-08-13Xext: allocate a separate event list for XTest events (#23100)Peter Hutterer1-6/+11
XTest event processing may be interrupted by a SIGIO. If Xtest uses the same event list as the rest of the server, this list may be overwritten in-flight. X.Org Bug 23100 <http://bugs.freedesktop.org/show_bug.cgi?id=23100> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
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