Commit Graph

575 Commits

Author SHA1 Message Date
Colin Harrison
9fba808b4f xsync: Prototype fix. 2008-12-11 13:22:53 -05:00
Adam Jackson
dce887ff53 xsync: build fix
argh protocol header disaster
2008-12-11 13:16:41 -05:00
Adam Jackson
1f4fb0225b xsync: Fix wakeup storm in idletime counter.
Wakeup scheduling only considered the threshold values, and not whether
the trigger was edge or level.

See also:
https://bugzilla.redhat.com/show_bug.cgi?id=474586
http://svn.gnome.org/viewvc/gnome-screensaver/trunk/src/test-idle-ext.c?view=markup
2008-12-11 10:31:48 -05:00
Adam Jackson
1a99110f0c xsync: ANSI cleanups 2008-12-11 10:31:45 -05:00
Adam Jackson
e0d8f6a808 xsync: Use a local header for server API definitions 2008-12-11 10:16:46 -05:00
Adam Jackson
1208a1dbca xsync: remove cast abuse. 2008-12-11 10:16:46 -05:00
Paulo Cesar Pereira de Andrade
b1dac41fb3 Use libtool convenience libraries and better "symbol" table.
All .a libraries were converted to .la, and instead of linking the
Xorg binary with a mix of .a and .la, and adding some libraries more
then once in the command line, etc, now it generates a single libxorg.la
from all the required convenience libraries, and links with a dummy
xorg.c (that should usually be the file with the main function...).
This removes the requirement of some things like libosandcommon and
libinit, that existed to circumvent problems when linking multiple
.a and .la in the final Xorg binary.

  The "symbol table" is now generated dynamically, by a shell script,
with an embedded gawk parser that parses cpp output. The new file
sdksyms.sh is generated by hand by analyzing all Makefile.am's and
making it create a sdksyms.c file, that includes all sdk headers that
will add symbols for the Xorg binary. Module headers aren't read, and
a in 2 files it was required to add a "<hash>ifndef XorgLoader" around
declarations shared between the Xorg binary and libextmod. A few
other changes were added to other sdk headers, like preventing
multiple inclusion, or including other headers to satisfy dependencies.

  This should be a lot more portable, and better (hopefully properly)
using libtool to generate convenience libraries.
2008-12-07 02:22:19 -02:00
Paulo Cesar Pereira de Andrade
49f77fff14 Rework symbol visibility for easier maintenance
Save in a few special cases, _X_EXPORT should not be used in C source
files. Instead, it should be used in headers, and the proper C source
include that header. Some special cases are symbols that need to be
shared between modules, but not expected to be used by external drivers,
and symbols that are accessible via LoaderSymbol/dlopen.

  This patch also adds conditionally some new sdk header files, depending
on extensions enabled. These files were added to match pattern for
other extensions/modules, that is, have the headers "deciding" symbol
visibility in the sdk. These headers are:
o Xext/panoramiXsrv.h, Xext/panoramiX.h
o fbpict.h (unconditionally)
o vidmodeproc.h
o mioverlay.h (unconditionally, used only by xaa)
o xfixes.h (unconditionally, symbols required by dri2)

  LoaderSymbol and similar functions now don't have different prototypes,
in loaderProcs.h and xf86Module.h, so that both headers can be included,
without the need of defining IN_LOADER.

  xf86NewInputDevice() device prototype readded to xf86Xinput.h, but
not exported (and with a comment about it).
2008-12-03 05:43:34 -02:00
Bernhard Rosenkraenzer
1dfed222e9 Xext: fix MultiBuffer compilation error with TryClientEvents. (#18835)
X.Org Bug 18835 <http://bugs.freedesktop.org/show_bug.cgi?id=18835>

Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
2008-12-02 15:50:38 +10:00
Paulo Cesar Pereira de Andrade
180bad8477 Add visibility flags to XSERVER_CFLAGS.
This is done to actually change DIX_CFLAGS, as not all "modules" use
XORG_CFLAGS.
  Also export the symbols that are required by other modules after
the change.
2008-12-02 02:50:45 -02:00
Paulo Cesar Pereira de Andrade
d6cbd4511e Export symbols defined in the sdk.
This is the biggest "visibility" patch. Instead of doing a "export"
symbol on demand, export everything in the sdk, so that if some module
fails due to an unresolved symbol, it is because it is using a symbol
not in the sdk.

  Most exported symbols shouldn't really be made visible, neither
advertised in the sdk, as they are only used by a single shared object.

  Symbols in the sdk (or referenced in sdk macros), but not defined
anywhere include:
XkbBuildCoreState()
XkbInitialMap
XkbXIUnsupported
XkbCheckActionVMods()
XkbSendCompatNotify()
XkbDDXFakePointerButton()
XkbDDXApplyConfig()
_XkbStrCaseCmp()
_XkbErrMessages[]
_XkbErrCode
_XkbErrLocation
_XkbErrData
XkbAccessXDetailText()
XkbNKNDetailMaskText()
XkbLookupGroupAndLevel()
XkbInitAtoms()
XkbGetOrderedDrawables()
XkbFreeOrderedDrawables()
XkbConvertXkbComponents()
XkbWriteXKBSemantics()
XkbWriteXKBLayout()
XkbWriteXKBKeymap()
XkbWriteXKBFile()
XkbWriteCFile()
XkbWriteXKMFile()
XkbWriteToServer()
XkbMergeFile()
XkmFindTOCEntry()
XkmReadFileSection()
XkmReadFileSectionName()
InitExtInput()
xf86CheckButton()
xf86SwitchCoreDevice()
RamDacSetGamma()
RamDacRestoreDACValues()
xf86Bpp
xf86ConfigPix24
xf86MouseCflags[]
xf86SupportedMouseTypes[]
xf86NumMouseTypes
xf86ChangeBusIndex()
xf86EntityEnter()
xf86EntityLeave()
xf86WrapperInit()
xf86RingBell()
xf86findOptionBoolean()
xf86debugListOptions()
LoadSubModuleLocal()
LoaderSymbolLocal()
getInt10Rec()
xf86CurrentScreen
xf86ReallocatePciResources()
xf86NewSerialNumber()
xf86RandRSetInitialMode()
fbCompositeSolidMask_nx1xn
fbCompositeSolidMask_nx8888x0565C
fbCompositeSolidMask_nx8888x8888C
fbCompositeSolidMask_nx8x0565
fbCompositeSolidMask_nx8x0888
fbCompositeSolidMask_nx8x8888
fbCompositeSrc_0565x0565
fbCompositeSrc_8888x0565
fbCompositeSrc_8888x0888
fbCompositeSrc_8888x8888
fbCompositeSrcAdd_1000x1000
fbCompositeSrcAdd_8000x8000
fbCompositeSrcAdd_8888x8888
fbGeneration
fbIn
fbOver
fbOver24
fbOverlayGeneration
fbRasterizeEdges
fbRestoreAreas
fbSaveAreas
composeFunctions
VBEBuildVbeModeList()
VBECalcVbeModeIndex()
TIramdac3030CalculateMNPForClock()
shadowBufPtr
shadowFindBuf()
miRRGetScreenInfo()
RRSetScreenConfig()
RRModePruneUnused()
PixmanImageFromPicture()
extern int miPointerGetMotionEvents()
miClipPicture()
miRasterizeTriangle()
fbPush1toN()
fbInitializeBackingStore()
ddxBeforeReset()
SetupSprite()
InitSprite()
DGADeliverEvent()

  SPECIAL CASES
o defined as _X_INTERNAL
	xf86NewInputDevice()
o defined as static
	fbGCPrivateKey
	fbOverlayScreenPrivateKey
	fbScreenPrivateKey
	fbWinPrivateKey
o defined in libXfont.so, but declared in xorg/dixfont.h
	GetGlyphs()
	QueryGlyphExtents()
	QueryTextExtents()
	ParseGlyphCachingMode()
	InitGlyphCaching()
	SetGlyphCachingMode()
2008-11-29 23:56:06 -02:00
Eamon Walsh
ed597f19fd xselinux: use "raw context" variants of getpeercon() and getcon(). 2008-11-25 22:49:19 -05:00
Eamon Walsh
2538fc0d89 xselinux: don't pass a NULL key string to selabel_lookup(). 2008-11-25 18:28:12 -05:00
James Cloos
b3c7e62664 Remove some null statements.
Remove several doubled statement-terminal semicolons.

Reported by Fernando Carrijo.
2008-11-08 12:21:20 -05:00
Daniel Stone
f4036f6ace Remove XEvIE
It's unmaintained and has been broken for quite a while; MPX finally
smashed it completely.

Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
2008-11-04 16:01:07 +10:30
Peter Hutterer
b6b26560d6 Move EXTENSION_BASE and EXTENSION_EVENT_BASE to misc.h. 2008-10-31 17:09:13 +10:30
Eamon Walsh
0f2fd0577f xselinux: send more specific message types to libaudit. 2008-10-30 18:29:51 -04:00
Julien Cristau
f2bda61c03 Xext: Fix compiler warnings
Make GEClientGone static and include registry.h, to fix the following
warnings:
geext.c:225: warning: no previous prototype for 'GEClientGone'
geext.c: In function 'GEExtensionInit':
geext.c:280: warning: implicit declaration of function 'RegisterResourceName'
geext.c:280: warning: nested extern declaration of 'RegisterResourceName'
2008-10-26 11:43:48 +01:00
Adam Jackson
8a5b89e8e1 xalloc+memset(0) -> xcalloc 2008-10-06 15:36:51 -04:00
Adam Jackson
f836e1f11b Unifdef ISC 2008-10-02 17:03:54 -04:00
Peter Harris
2b266eda6e Fix panoramiX request and reply swapping
Fix panoramiX request and reply swapping
 Set window and screen values in panoramix replies
 Prevent buffer overrun in ProcPanoramiXGetScreenSize
2008-09-21 19:19:24 +02:00
Julien Cristau
b5cdcfa55c Xevie: swap replies as necessary 2008-09-01 20:05:05 +02:00
Thorvald Natvig
d3ae193f4a Xevie: always initialize rep.length (bug#17394)
The XEvIE extension doesn't clear the rep.length field for any reply but
the version check. Hence, if there is junk data in it and that is sent
to the client, it hangs.

X.Org bug#17394 (http://bugs.freedesktop.org/show_bug.cgi?id=17394)
2008-09-01 19:36:56 +02:00
Eamon Walsh
60ad8d5d05 Attempt getpeercon() on remote sockets as well as local ones. 2008-08-28 23:45:17 -04:00
Tomas Carnecky
ebea78cdba Prepare for array-index based devPrivates.
TODO: static indices can be made just an int; some indices
can be combined.
2008-08-28 18:05:40 -04:00
Adam Jackson
835b532d6f Build fix. 2008-08-28 14:49:35 -04:00
Adam Jackson
040212ee60 MIT-SHM pixmaps, if they exist, are ZPixmap. 2008-08-28 13:49:35 -04:00
Adam Jackson
ee7c684f21 Reimplement ShmPutImage.
There's no reason to not just dispatch this straight into the GC.  As a
bonus, if you do so, damage wraps correctly, and thus swcursor works.
The side effect is it's no longer possible to override ShmPutImage with
ShmRegisterFuncs().

Also remove the (broken) damage tracking for same from EXA, since it didn't
work right, and is now superfluous.
2008-08-28 10:12:28 -04:00
Adam Jackson
64ef7ed072 Centralize declaration of ConnectionInfo. 2008-08-20 13:14:34 -04:00
Adam Jackson
0ce687634f Eviscerate save-under support.
Use a compositing manager already.  Plus I really wanted to use 'eviscerate'
in a commit message.
2008-08-13 17:28:08 -04:00
Tomas Carnecky
5532d63488 Redefine WindowTable as a fixed array
Instead of xalloc'ing it every server generation. The array is always
the same size (MAXSCREENS), anyway.
2008-08-05 01:17:32 +03:00
Aaron Plattner
b37b1e6699 Make shmint.h part of the SDK.
This includes ShmRegisterFuncs, ShmSetPixmapFormat, fbShmPutImage, and
ShmRegisterFbFuncs.  Note that fbShmPutImage was already exported.
2008-07-30 18:55:03 -07:00
Adam Jackson
f3ff238601 Sync is built-in and mandatory. 2008-07-24 15:46:08 -04:00
Adam Jackson
3fcf4d3eb8 XC-MISC is built-in and mandatory. 2008-07-24 15:46:08 -04:00
Adam Jackson
9757106bba Remove all empty extension reset hooks, replace with NULL. 2008-07-24 15:46:08 -04:00
Adam Jackson
f65c50c4e9 Bigreqs are built-in and mandatory. 2008-07-24 15:46:08 -04:00
Adam Jackson
d6228cb22a Shape extension is built-in and mandatory. 2008-07-24 15:46:08 -04:00
Adam Jackson
0b45ba488d Drop the FONTCACHE extension.
This appears to have been dead code since X-TT was merged.
2008-07-18 10:54:10 -04:00
Mathieu Bérard
47833eef35 Drop a bunch of #ifdef Lynx. 2008-07-17 11:59:24 -04:00
Peter Hutterer
acce270935 Xext: store the GenericMasks in the resource system.
This fixes a severe issue - when the client died the event mask didn't get
unregistered and a future event would dereference dangling pointers. By
storing the event masks in the resource system we can free them when the
client dies.
2008-07-10 16:02:55 +09:30
Eamon Walsh
79dd600942 SELinux: Add an extension alias under the OS-agnostic "Flask" name. 2008-06-17 19:11:21 -04:00
Eamon Walsh
720e44f973 Fix "warning: no previous prototype for ‘XevieExtensionInit’". 2008-06-13 21:42:37 -04:00
Kristian Høgsberg
dba5455f06 Un-K&R shm extension. 2008-06-11 11:41:44 -04:00
Matthieu Herrb
063f18ef6d CVE-2008-1379 - MIT-SHM arbitrary memory read
An integer overflow in the validation of the parameters of the
ShmPutImage() request makes it possible to trigger the copy of
arbitrary server memory to a pixmap that can subsequently be read by
the client, to read arbitrary parts of the X server memory space.
2008-06-11 08:06:09 -06:00
Matthieu Herrb
95d162c438 CVE-2008-1377 - RECORD and Security extensions memory corruption
Lack of validation of the parameters of the
SProcSecurityGenerateAuthorization SProcRecordCreateContext
functions makes it possible for a specially crafted request to trigger
the swapping of bytes outside the parameter of these requests, causing
memory corruption.
2008-06-11 08:06:09 -06:00
Peter Hutterer
6528eb885d Xext: init firstValuator to zero, otherwise core XTest events may get lost. 2008-06-11 17:24:19 +09:30
Peter Hutterer
105d28652d Xext: use GPE/GKE from XTestFakeInput #16145
This commit fixes two problems:
1) XTFI used to assemble the event itself, then passed it to the device. It's
much easier to just pass the variables into GPE/GKE and let the DIX do the
rest.

2) XTFI would pass the VCP/VCK as default device to event processing. As a
result, updating LEDs would be updated on the VCK, not on the actual keyboard.
Instead, we now pass the events through the last-used SD, thus toggling the
LEDs on the last keyboard that sent through this MD.

Also some cleanup in XTFI to merge validity checks a bit closer together
rather than having several different sections.

This breaks XTestFakeMotion with Xinerama though.

X.Org Bug 16145 <http://bugs.freedesktop.org/show_bug.cgi?id=16145>
2008-05-31 17:42:06 +09:30
Peter Hutterer
f9bcecbe51 Xext: only free events in case of core motion events. 2008-05-29 18:14:54 +09:30
Peter Hutterer
26c1958c32 Merge branch 'master' into mpx 2008-05-26 17:37:31 +09:30
Peter Hutterer
6c9e9f8a40 input: instead of lastx/y, use a last.valuators[] array on the device.
During GetPointerEvents (and others), we need to access the last coordinates
posted for this device from the driver (not as posted to the client!). Lastx/y
is ok if we only have two axes, but with more complex devices we also need to
transition between all other axes.

ABI break, recompile your input drivers.
2008-05-23 12:01:37 +09:30
Peter Hutterer
5c5a1eaf68 Replace UniSA with full Uni name in Author affiliation.
Big boss says UniSA isn't unique enough. Who am I to argue?
2008-05-21 21:51:27 +09:30
Aaron Plattner
8b3d26f5b6 Short-circuit PanoramiXTranslateVisualID after verifying that the visual actually exists first.
This allows using PanoramiXTranslateVisualID to test whether a given visual made
it through PanoramiXVisualConsolidate.
2008-05-20 14:11:19 -07:00
Peter Hutterer
99d28c3ef3 Merge branch 'master' into mpx
Conflicts:

	Xext/xprint.c (removed in master)
	config/hal.c
	dix/main.c
	hw/kdrive/ati/ati_cursor.c (removed in master)
	hw/kdrive/i810/i810_cursor.c (removed in master)
	hw/xprint/ddxInit.c (removed in master)
	xkb/ddxLoad.c
2008-05-20 10:20:14 +09:30
Peter Hutterer
fc7e2566cc Xext: fix typo in condition.
Fall-out from dc3aba8a55.
We must free the event if it is NOT an extension event.
2008-05-16 21:10:30 +09:30
Peter Hutterer
dc3aba8a55 Xext: emulate XI events from core events when faking input.
We need XI events for event processing, so lets get rid of the pure core
events ASAP.
2008-05-13 20:00:08 +09:30
Peter Hutterer
8b3802d320 Xext: core button events have rootX/Y unset too. 2008-05-13 13:47:52 +09:30
Aaron Plattner
c50b5d9789 Bug #14692: Allow drivers to have a say in Xinerama visual consolidation.
Create a new exported global variable, XineramaVisualsEqualPtr.  Use this
pointer to decide whether two visuals are equal during visual consolidation.
This pointer can be wrapped, which allows drivers and extensions to control
which visuals are consolidated.  A wrapper can reject the visuals without
calling down, but must call down and return that result if it deems the visuals
equal.  This ensures that all layers agree that the visuals are equal.

Pass the screen of the other visual into the VisualsEqual callchain.

Don't free PanoramiXVisuals since we need it for PanoramiXTranslateVisualID.

Don't skip the first visual on the other screen in PanoramiXMaybeAddVisual.

Skip the loop in PanoramiXTranslateVisualID if screen is 0.
2008-05-12 14:49:53 -07:00
Adam Jackson
1c8bd318fb X n'est pas une print API. 2008-05-12 14:15:11 -04:00
Peter Hutterer
3344569529 Merge branch 'master' into mpx
Conflicts:

	Xi/exevents.c
	dix/devices.c
2008-05-02 11:00:14 +09:30
Peter Hutterer
f5ac98747d Standardise copyright headers for all new files created as part of MPX. 2008-04-25 14:50:24 +09:30
Peter Hutterer
cc13f87cd8 Xext: XGE: change function definition to have return value on separate line.
This seems to be the common style in most parts of the server.
2008-04-24 11:43:47 +09:30
Peter Hutterer
d0890c40b9 Xext: add a few lines of comments to XGE. 2008-04-24 11:32:36 +09:30
Peter Hutterer
745b90cde1 Xext: re-do the XGE versioning handling.
Basically the same approach RandR takes. Remember which one the client
requested, send back the one the server supports. Also divide XGE server
version (now defined in geext.c) and the client's version (still in the
protocol definition).
2008-04-24 11:27:22 +09:30
Peter Hutterer
5f3e5b3462 Xext: remove trailing whitespaces in geext.{c|h} 2008-04-24 11:14:43 +09:30
George Sapountzis
6cd9287aed drop EVI remnants 2008-04-23 18:11:56 +03:00
Peter Hutterer
8190ef8754 Merge branch 'master' into mpx
Conflicts:

	Xext/EVI.c
	Xext/appgroup.c
	Xext/cup.c
	Xext/mitmisc.c
	Xext/sampleEVI.c
	dix/window.c
2008-04-22 18:04:05 +09:30
Peter Hutterer
179a082c26 Xext: route event through master if required (XTestFakeInput) 2008-04-22 17:45:55 +09:30
Peter Hutterer
8209fdbc7c Xext: Update sprite on fake input only for MDs and floating SDs. 2008-04-22 17:45:42 +09:30
Adam Jackson
a7503615a6 Death to TOG-CUP.
If you still care about 8bpp visuals that much, fix Composite to provide
synthetic visuals.
2008-04-18 19:56:41 -04:00
Eric Anholt
25827fde68 Nuke the MIT-SUNDRY-NONSTANDARD extension.
This extension provided bug-compatibility with pre-X11R6, but has been
stubbed out in our server since 2006 to return BadRequest when you actually
asked for it.
2008-04-18 16:37:08 -07:00
Adam Jackson
13adef8a17 Finish deleting EVI 2008-04-18 19:01:06 -04:00
Adam Jackson
eafaf40fb3 Death to APPGROUP. 2008-04-18 18:50:05 -04:00
Adam Jackson
f6617b4127 Death to Extended Visual Information. 2008-04-18 18:28:01 -04:00
Peter Hutterer
e0eaf8e5e3 Xext: Let XTestFakeInput update the sprite for XI events.
Since XI devices can have their own sprite now, we need to update the sprite
coordinates too when processing an XI event.
Note: This doesn't deal with the device hierarchy correctly yet.
2008-04-18 14:39:41 +09:30
Peter Hutterer
cb0168b4ac Xext: xtest.c: death to tabs+spaces indendation, remove #define XINPUT 2008-04-18 14:39:35 +09:30
Michel Dänzer
0d1746995d Fix off-by-one error in ProcXResQueryClients().
Fixes memory corruption reported at
http://bugs.freedesktop.org/show_bug.cgi?id=14004 .
2008-04-09 13:49:05 +02:00
Peter Hutterer
fd06e8f8c1 Merge branch 'master' into dcdc_rework
Conflicts:

	Xext/xevie.c
	dix/dispatch.c
2008-04-07 07:56:41 +09:30
Eamon Walsh
9f56fc5806 XSELinux: Add a request to get a client's context from a resource ID. 2008-03-31 17:35:10 -04:00
Eamon Walsh
b5f98fcea2 XSELinux: Add xorg.conf option for permissive/enforcing/disabled.
Patch by Joe Nall.

The option goes in the "extmod" subsection.
TODO: Make it easier for extension modules to handle their own options.
2008-03-28 14:14:23 -04:00
Adam Jackson
536f2ff538 Bug #13962: Re-arm the DPMS timer when re-enabling DPMS. 2008-03-24 12:22:19 -04:00
Eamon Walsh
3bbd77ff98 XSELinux: Do a check for whether background "None" is allowed. 2008-03-20 20:03:02 -04:00
Eamon Walsh
e323bb426c XSELinux: Correctly handle some permission bits that are used more than once. 2008-03-20 19:42:09 -04:00
Alan Coopersmith
060a99444e Make Xevie private symbol names less generic
Makes it easier to figure out what you're seeing in the stack trace
instead of wondering where in the server "ProcSend" is.
2008-03-19 16:04:16 -07:00
Alan Coopersmith
f37046984d Xevie cleanups, byteswapping fixes & request length check fixes 2008-03-19 14:06:53 -07:00
Eamon Walsh
d4101140f4 xselinux: Implement polyinstantiation support and related protocol. 2008-03-04 22:39:41 -05:00
Peter Hutterer
4f2cd0ed96 Merge branch 'master' into mpx
This merge reverts Magnus' device coorindate scaling changes. MPX core event
generation is very different, so we can't scale in GetPointerEvents.

Conflicts:

	Xi/opendev.c
	dix/devices.c
	dix/dixfonts.c
	dix/getevents.c
	dix/resource.c
	dix/window.c
	hw/xfree86/common/xf86Xinput.c
	mi/mipointer.c
	xkb/ddxBeep.c
	xkb/ddxCtrls.c
	xkb/ddxKeyClick.c
	xkb/ddxList.c
	xkb/ddxLoad.c
	xkb/xkb.c
	xkb/xkbAccessX.c
	xkb/xkbEvents.c
	xkb/xkbInit.c
	xkb/xkbPrKeyEv.c
	xkb/xkbUtils.c
2008-03-04 18:11:10 +10:30
Eamon Walsh
cc76ea6e3a XACE: Add generic support for property and selection polyinstantiation. 2008-02-29 18:01:37 -05:00
Eamon Walsh
34bf308a9e dix: Refactoring of selection code to allow for polyinstantiation.
Introduces dixLookupSelection() API.
Removes NumCurrentSelections from API.
2008-02-29 18:01:37 -05:00
Eamon Walsh
d04ea267a4 xselinux: Don't require device "read" permission for XQueryPointer.
These keyboard and pointer state polling calls are a real problem.
2008-02-28 21:53:16 -05:00
Eamon Walsh
3fb17a3e64 xselinux: Log messages to both libaudit and Xorg.0.log. 2008-02-28 21:52:57 -05:00
Eamon Walsh
27bcf40cda XACE: Fix instances of DixUnknownAccess at hook callsites. 2008-02-28 16:43:43 -05:00
Eamon Walsh
f616735f17 xselinux: Prefix a few remaining error messages with "SELinux". 2008-02-27 22:48:29 -05:00
Eamon Walsh
e40cc5305b xselinux: Don't throw BadAccess if DixUnknownAccess is passed in to a hook.
The avc will still appear, however, so that the callsite can be fixed.
2008-02-27 22:48:28 -05:00
Eamon Walsh
3f0681fb0b xselinux: Stub out selection protocol requests. 2008-02-26 23:14:29 -05:00
Eamon Walsh
4632ea2258 xselinux: Rip out the selection code in advance of polyinstantiation support.
This resolves an issue where BadWindow errors were being thrown.
2008-02-26 22:00:52 -05:00
Eamon Walsh
c8e979b3b8 security: Register resource names in the server-side name registry. 2008-02-26 21:36:46 -05:00
Adam Jackson
ee21aba6be Fix Xinerama's consolidated visual handling.
Formerly the code claimed it could only handle up to 256 visuals, which
was true.  Also true, but not explicitly stated, was that it could only
handle visuals with VID < 256.  If you have enough screens, and subsystems
that add lots of visuals, you can easily run off the end.  (Made worse
because we allocate visual IDs from the same pool as XIDs.)  If your app
then chooses a visual > 256, then the Xinerama code would throw BadMatch
on CreateColormap and your app wouldn't start.

With this change, PanoramiXVisualTable is gone.  Other subsystems that
were using it as a translation table between each screen's visuals now
use a PanoramiXTranslateVisual() helper.
2008-02-22 15:19:54 -05:00
Eamon Walsh
f343265a28 XACE: Make the default window background state configurable per-window.
To recap: the original XC-SECURITY extension disallowed background "None" if
the window was untrusted.  XACE 1.0 preserved this check as a hook function.
XACE pre-2.0 removed the hook and first abolished background "None entirely,
then restored it as a global on/off switch in response to Bug #13683.
Now it's back to being per-window, via a flag instead of a hook function.
2008-02-20 15:59:40 -05:00
Eamon Walsh
4573cb2ce4 security: Revise set of permissions granted to untrusted clients.
Bug #14480: untrusted access broken on 7.3.
2008-02-13 20:20:49 -05:00
Eamon Walsh
e99aadbc26 xselinux: Add use to permission map for devices. 2008-02-13 20:20:49 -05:00
Adam Jackson
f3b3b37ec6 Use strerror instead of errno values in user strings. 2008-02-14 07:52:02 +11:00
Adam Jackson
62cfe88638 Redact all mention of PanoramiX from user strings. 2008-02-14 07:11:14 +11:00
Eamon Walsh
0d492b2166 XACE: Move the selection access hook to its own function. 2008-02-12 19:59:10 -05:00
Eamon Walsh
31934132a4 xselinux: Use the device name in debugging output. 2008-02-07 16:32:06 -05:00
Eamon Walsh
6dcb7d732b xselinux: Split devPrivate state into subject and object records. 2008-02-07 16:00:52 -05:00
Eamon Walsh
2259b144f0 xselinux: Add getattr and setattr to the permission map for properties. 2008-02-07 14:35:02 -05:00
Eamon Walsh
5c30327275 XACE: Push the dix "structure" includes down to the security modules. 2008-02-05 21:06:05 -05:00
Eamon Walsh
bb1a577a68 XACE: Move the property access hook to its own function. 2008-02-05 20:07:08 -05:00
Peter Hutterer
0ac1755977 Merge branch 'master' into mpx
Conflicts:

	Xext/sampleEVI.c
2008-01-26 13:55:07 +10:30
Eamon Walsh
e915a26397 xselinux: Move the extension to extmod instead of being built-in. 2008-01-25 19:22:19 -05:00
Eamon Walsh
f6a78ee143 XACE: Remove the extension code entirely, XACE is completely static now. 2008-01-25 18:04:10 -05:00
Eamon Walsh
7724c30a75 XACE: Stop using fake requestVectors in favor of a simple hook call. 2008-01-25 17:28:17 -05:00
Eamon Walsh
f82329b081 XACE: Don't need to actually register a protocol extension. 2008-01-25 16:20:46 -05:00
Eamon Walsh
46794d0c96 xselinux: Rename SelectionManager to more generic SecurityManager. 2008-01-24 19:49:13 -05:00
Peter Hutterer
379f057646 Xext: add GEDeviceMaskIsSet (GE mask checking per device)
If a mask was set for the NULL device, then we pretend the mask is set for all
devices.
2008-01-25 10:27:26 +10:30
Peter Hutterer
94a6a65ae7 Xext: allow per-device GE masks.
Instead of a single mask per client we allow the storage of a mask per client
per device.
2008-01-25 10:26:41 +10:30
Eamon Walsh
6ffeecabb7 xselinux: Use a privileged bit in the state instead of passing an index
to the permission checking function.
2008-01-24 18:11:49 -05:00
Eamon Walsh
7ba8e97cba xselinux: Implement "get context" protocol requests. 2008-01-24 19:09:58 -05:00
Eamon Walsh
f0bf9a5231 xselinux: Whitespace fixups. 2008-01-24 19:02:35 -05:00
Matthias Hopf
be6c17fcf9 CVE-2007-6429: Always test for size+offset wrapping. 2008-01-21 16:13:21 +01:00
Adam Jackson
e9fa7c1c88 CVE-2007-6429: Don't spuriously reject <8bpp shm pixmaps.
Move size validation after depth validation, and only validate size if
the bpp of the pixmap format is > 8.  If bpp < 8 then we're already
protected from overflow by the width and height checks.
2008-01-18 14:41:20 -05:00
Peter Hutterer
883811c2be dix: remove inputInfo.pointer reference in TryClientEvents.
Unfortunately, this requires a change in the TCE API, and thus a change in all
callers. Tough luck.
2008-01-18 18:48:46 +10:30
Matthieu Herrb
6de61f8272 Fix for CVE-2007-6429 - MIT-SHM and EVI extensions integer overflows. 2008-01-17 15:28:42 +01:00
Matthieu Herrb
7dc1717ff0 Fix for CVE-2007-6428 - TOG-cup extension memory corruption. 2008-01-17 15:28:03 +01:00
Michel Dänzer
e46f6ddecc Yet another Xv extension byte swapping fix. 2008-01-16 14:24:22 +01:00
Alan Coopersmith
6844bd2e63 More Xv extension byte swapping fixes 2008-01-09 19:52:00 -08:00
Peter Hutterer
38bf01bd1c Merge branch 'master' into mpx 2008-01-10 13:38:46 +10:30
Richard Purdie
c31aead0fe [Kdrive] make XCalibrate 'orientation aware' 2008-01-08 12:31:47 +01:00
Eamon Walsh
39cb782f28 XACE: DeleteCallbackList zeroes out its argument so don't do it twice. 2008-01-03 23:17:06 -05:00
Eamon Walsh
cd0603c2dc Bug #13765: Heap corruption in XC-SECURITY extension code. 2008-01-03 21:41:02 -05:00
Eamon Walsh
17a9714a67 Bug #13794: Update MBE extension devPrivates to new interface. 2008-01-03 14:46:54 -05:00
Peter Hutterer
8da83836b6 Merge branch 'master' into mpx
Conflicts:

	XTrap/xtrapddmi.c
	Xext/security.c
	Xext/xprint.c
	Xext/xtest.c
	Xext/xvdisp.c
	Xi/exevents.c
	Xi/grabdevb.c
	Xi/grabdevk.c
	Xi/opendev.c
	Xi/ungrdev.c
	Xi/ungrdevb.c
	Xi/ungrdevk.c
	dix/cursor.c
	dix/devices.c
	dix/dixutils.c
	dix/events.c
	dix/getevents.c
	dix/main.c
	dix/window.c
	hw/xfree86/ramdac/xf86Cursor.c
	include/dix.h
	include/input.h
	include/inputstr.h
	mi/midispcur.c
	mi/miinitext.c
	mi/misprite.c
	render/animcur.c
	xfixes/cursor.c
	xkb/xkbAccessX.c
2008-01-03 17:04:54 +10:30
Alan Coopersmith
dfd682b582 X.Org bug 4947/Sun bug 6646626: Xv extension not byte-swapping properly
X.Org Bugzilla #4947 <https://bugs.freedesktop.org/show_bug.cgi?id=4947>
Sun bug 6646626 <http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6646626>

Don't use swapped data after swapping it.   When done swapping data,
send the swapped data, not the address of the pointer to it, to the client.
2008-01-02 19:27:22 -08:00
Eamon Walsh
3b23dd9fd4 xselinux: Fix whitespace warnings. 2007-12-28 13:29:45 -05:00
Eamon Walsh
643c52be32 xselinux: Remove "X" prefix on remaining functions and strings.
Should be evident from the context.
2007-12-28 13:27:28 -05:00
Eamon Walsh
f4bc333fc1 xselinux: don't FatalError on an invalid class mapping, just disable support. 2007-12-28 13:27:28 -05:00
Eamon Walsh
f3780ece52 xselinux: Implement swapped protocol request logic. 2007-12-28 13:27:28 -05:00
Eamon Walsh
1bbf64ab11 xselinux: Remove unnecessary structure definition. 2007-12-28 13:27:28 -05:00
Adam Jackson
743008a481 Report serverClient resources in the X-Resource extension. 2007-12-23 14:27:14 -05:00
Eamon Walsh
1393a97ea9 xselinux: Send AVC messages to audit system instead of log file/stderr. 2007-12-20 16:23:49 -05:00
Peter Hutterer
66b00029e5 Xext: remove redefinition of Bool.
Thanks to Simon Thum.
2007-12-19 18:11:32 +10:30
Sam Lau
51fab1eb30 Sun bug 6278039: Xevie checking wrong size in swapped XevieSelectInput requests
<http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6278039>
2007-12-18 11:40:09 -08:00
Eamon Walsh
97c82ce051 XACE: Restore the old background None behavior in response to bug #13683.
From the X11 protocol spec:

"If background None is specified, the window has no defined background."

This means that toolkits and apps cannot rely on the "transparent" nature
of the current implementation!  At some point before the next release,
XACE will switch back to a solid background as the default.
2007-12-17 23:12:01 -05:00
Eamon Walsh
c8feb73f58 Merge branch 'master' into XACE-SELINUX
Conflicts:

	Xext/EVI.c
	Xext/bigreq.c
	Xext/cup.c
	Xext/dpms.c
	Xext/fontcache.c
	Xext/mitmisc.c
	Xext/xcmisc.c
	Xext/xf86bigfont.c
	Xext/xtest.c
	configure.ac
	dbe/dbe.c
	hw/darwin/darwin.h
	hw/darwin/darwinEvents.c
	hw/darwin/iokit/xfIOKit.h
	hw/darwin/iokit/xfIOKitCursor.c
	hw/darwin/quartz/fullscreen/fullscreen.c
	hw/darwin/quartz/fullscreen/quartzCursor.c
	hw/darwin/quartz/quartz.c
	hw/darwin/quartz/quartzCommon.h
	hw/darwin/quartz/quartzCursor.c
	hw/darwin/quartz/xpr/dri.c
	hw/darwin/quartz/xpr/dristruct.h
	hw/darwin/quartz/xpr/xprCursor.c
	hw/darwin/quartz/xpr/xprFrame.c
	hw/xfree86/modes/xf86RandR12.c
	include/cursor.h
	miext/rootless/rootlessCommon.h
	miext/rootless/rootlessScreen.c
	miext/rootless/rootlessWindow.c
	render/picturestr.h

Trying to pick up the pieces from the darwin churn here...
2007-12-13 18:38:25 -05:00
Eamon Walsh
9a7ce57363 xselinux: Add new protocol for setting device create context. 2007-12-12 20:44:59 -05:00
Peter Harris
2d723bbd0d Add missing swaps in panoramiXSwap.c 2007-12-05 18:29:54 +00:00
Adam Jackson
0fff01f566 Fix swapped Xv dispatch under Xinerama.
Same-endian dispatch was properly calling through the Xinerama wrapping,
but other-endian dispatch wasn't.
2007-12-02 14:15:36 -05:00
Adam Jackson
fa47910045 Clean up many #if 0. 2007-12-02 12:40:25 -05:00
Peter Hutterer
f9269bebae DeviceIntRec: move lastx/lasty from valuator into DeviceIntRec.
We free the ValuatorClassRec quite regularly. If a SIGIO is handled while
we're swapping device classes, we can bring the server down when we try to
access lastx/lasty of the master device.
2007-11-22 17:30:14 +10:30
Peter Hutterer
33f1568992 xtest: switch an inputInfo.pointer over to PickPointer.
Couple of whitespace fixes too.
2007-11-21 16:14:49 +10:30