/*
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*/
#ifndef _TSOL_INFO_H
#define _TSOL_INFO_H
#include <ucred.h>
#include "misc.h"
#include "dixstruct.h"
#include "selection.h"
#include "globals.h"
/*********************************
*
* DEBUG INFO
*
*********************************/
* Level 0 messages are printed by all servers to stderr.
* Ranges of messages to print to stderr can be changed with Xorg -verbose N
* and Xephyr -verbosity N
* Ranges of messages to print to log can be changed with Xorg -logverbose N
* Other servers don't support runtime configuration of log messages yet.
*/
extern const char *TsolErrorNameString(int req);
extern const char *TsolPolicyReturnString(int pr);
extern const char *TsolRequestNameString(int req);
/*********************************
*
* CONSTANTS
*
*********************************/
/*
* X audit events start from 9101 in audit_uevents.h. The first 2 events
* are non-protocol ones viz. ClientConnect, mapped to 9101 and
* ClientDisconnect, mapped to 9102.
* The protocol events are mapped from 9103 onwards in the serial order
* of their respective protocol opcode, for eg, the protocol UngrabPointer
* which is has a protocol opcode 27 is mapped to 9129 (9102 + 27).
* All extension protocols are mapped to a single audit event AUE_XExtension
* as opcodes are assigined dynamically to these protocols. We set the
* extension protocol opcode to be 128, one more than the last standard opcode.
*/
/*
* Various flags for TsolInfoRec, TsolResRec
*/
/*
* Polyinstantiated property/selections
*/
enum tsolconfig_types {
TSOL_ATOM = 0,
};
/*
* Masks corresponding various types
*/
/*********************************
*
* MACROS
*
*********************************/
/*
* True if client is part of TrustedPath
*/
(tsolinfo->trusted_path ||\
/*********************************
*
* DATA STRUCTURES
*
*********************************/
enum client_types {
};
/*
* Extended attributes for each client.
* Most of the information comes from getpeerucred()
*/
typedef struct _TsolInfo {
int asaverd;
/*
* per resource info
*/
typedef struct _TsolRes {
to selection or properties */
/*
* per keyboard info:
*/
typedef struct _HotKeyRec {
int initialized;
/*
* information stored in devPrivates
*/
/* Currently only used in keyboard devices */
static inline TsolInfoPtr
{
}
static inline TsolResPtr
{
}
static inline TsolResPtr
{
}
static inline TsolResPtr
{
}
static inline TsolResPtr
{
}
static inline HotKeyPtr
{
}
typedef struct _TsolNodeRec {
unsigned int flags;
int IsSpecial;
/*
* if polyinst true, the name list is polyinstantiated
* if false, the everything except the list is polyinstantiated
* NOTE: Default for seln: polyinstantiate the list
* Default for prop: polyinstantiate everything except the list
*/
typedef struct _TsolPolyAtom {
int polyinst;
char **name;
/*
* PolyInstInfo represents if a get request will match the
* client's sl,uid for this or it will use the polyinstinfo
*/
typedef struct _TsolPolyInstInfo {
/*********************************
*
* EXTERNS
*
*********************************/
extern TsolPolyInstInfoRec tsolpolyinstinfo;
extern Bool system_audit_on;
/*********************************
*
* FUNCTION PROTOTYPES
*
*********************************/
extern int TsolDisabledExtension(const char *extname);
extern bslabel_t *lookupSL_low(void);
#endif /* _TSOL_INFO_H */