VirtualBox

source: vbox/trunk/src/VBox/Additions/x11/x11include/xorg-server-1.3.0.0/xace.h@ 25078

最後變更 在這個檔案從25078是 25078,由 vboxsync 提交於 15 年 前

Additions/x11/x11include: exported and set eol-style on new headers

  • 屬性 svn:eol-style 設為 native
檔案大小: 3.2 KB
 
1/************************************************************
2
3Author: Eamon Walsh <[email protected]>
4
5Permission to use, copy, modify, distribute, and sell this software and its
6documentation for any purpose is hereby granted without fee, provided that
7this permission notice appear in supporting documentation. This permission
8notice shall be included in all copies or substantial portions of the
9Software.
10
11THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
12IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
13FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
14AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
15AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
16CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
17
18********************************************************/
19
20#ifndef _XACE_H
21#define _XACE_H
22
23#define XACE_EXTENSION_NAME "XAccessControlExtension"
24#define XACE_MAJOR_VERSION 1
25#define XACE_MINOR_VERSION 0
26
27#include "pixmap.h" /* for DrawablePtr */
28#include "regionstr.h" /* for RegionPtr */
29
30#define XaceNumberEvents 0
31#define XaceNumberErrors 0
32
33/* security hooks */
34/* Constants used to identify the available security hooks
35 */
36#define XACE_CORE_DISPATCH 0
37#define XACE_EXT_DISPATCH 1
38#define XACE_RESOURCE_ACCESS 2
39#define XACE_DEVICE_ACCESS 3
40#define XACE_PROPERTY_ACCESS 4
41#define XACE_DRAWABLE_ACCESS 5
42#define XACE_MAP_ACCESS 6
43#define XACE_BACKGRND_ACCESS 7
44#define XACE_EXT_ACCESS 8
45#define XACE_HOSTLIST_ACCESS 9
46#define XACE_SITE_POLICY 10
47#define XACE_DECLARE_EXT_SECURE 11
48#define XACE_AUTH_AVAIL 12
49#define XACE_KEY_AVAIL 13
50#define XACE_WINDOW_INIT 14
51#define XACE_AUDIT_BEGIN 15
52#define XACE_AUDIT_END 16
53#define XACE_NUM_HOOKS 17
54
55extern CallbackListPtr XaceHooks[XACE_NUM_HOOKS];
56
57/* Entry point for hook functions. Called by Xserver.
58 */
59extern int XaceHook(
60 int /*hook*/,
61 ... /*appropriate args for hook*/
62 );
63
64/* Register a callback for a given hook.
65 */
66#define XaceRegisterCallback(hook,callback,data) \
67 AddCallback(XaceHooks+(hook), callback, data)
68
69/* Unregister an existing callback for a given hook.
70 */
71#define XaceDeleteCallback(hook,callback,data) \
72 DeleteCallback(XaceHooks+(hook), callback, data)
73
74
75/* From the original Security extension...
76 */
77
78/* Hook return codes */
79#define SecurityAllowOperation 0
80#define SecurityIgnoreOperation 1
81#define SecurityErrorOperation 2
82
83/* Proc vectors for untrusted clients, swapped and unswapped versions.
84 * These are the same as the normal proc vectors except that extensions
85 * that haven't declared themselves secure will have ProcBadRequest plugged
86 * in for their major opcode dispatcher. This prevents untrusted clients
87 * from guessing extension major opcodes and using the extension even though
88 * the extension can't be listed or queried.
89 */
90extern int (*UntrustedProcVector[256])(ClientPtr client);
91extern int (*SwappedUntrustedProcVector[256])(ClientPtr client);
92
93extern void XaceCensorImage(
94 ClientPtr client,
95 RegionPtr pVisibleRegion,
96 long widthBytesLine,
97 DrawablePtr pDraw,
98 int x, int y, int w, int h,
99 unsigned int format,
100 char * pBuf
101 );
102
103#endif /* _XACE_H */
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette