X Server State Storage

XACE does not provide a mechanism for attaching state (labels) to X server objects. This mechanism is provided through a separate subsystem, devPrivates, which was originally intended for device driver writers to use for storing private data [1]. Certain server objects possess a devPrivates field, which points to a dynamically allocated array of generic value/pointer unions. At initialization time, drivers, extensions, and other modules can register for a slot in this array, and can additionally specify an amount of memory which will be allocated and referred to by the generic pointer in that slot. When object instances are created, the registrations are used to allocate the array and any extra space requested. In this way, devPrivates provides the ability to hang extra data from certain server objects.

The objects supported by devPrivates include the client structure itself, which is the main structure created when a new client connection is made. Device-related structures, including the ScreenRec object which represents a single screen, and the DeviceIntRec object which represents an input device, are also supported. The ExtensionEntry structure that represents each protocol extensions is supported (this support was added as part of the XACE work). Finally, some resource objects, including window and pixmap objects, are supported.

However, many resource types do not include a devPrivates field in their structure definitions. Minor objects such as individual window properties, and ephemeral objects such as event messages are likewise not supported. Extending the reach of the devPrivates mechanism to these objects is a priority; refer to Section 5.2.