python-27: make tkinter-27 dependency actually conditional
[unleashed-userland.git] / components / x11 / xorg-server / srcs / tsol / tsolpolicy.h
blobf87791e7042ae73b956fd988e2e0ec93a44c5455
1 /* Copyright (c) 2004, 2009, Oracle and/or its affiliates. All rights reserved.
3 * Permission is hereby granted, free of charge, to any person obtaining a
4 * copy of this software and associated documentation files (the "Software"),
5 * to deal in the Software without restriction, including without limitation
6 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
7 * and/or sell copies of the Software, and to permit persons to whom the
8 * Software is furnished to do so, subject to the following conditions:
10 * The above copyright notice and this permission notice (including the next
11 * paragraph) shall be included in all copies or substantial portions of the
12 * Software.
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
23 #ifndef _TSOL_POLICY_H
24 #define _TSOL_POLICY_H
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
31 #include <assert.h>
33 #define PASSED 0 /* success code 0 */
34 #ifndef FAILED
35 #define FAILED 1 /* failed is non-zero (could be error no) */
36 #endif /* FAILED */
38 #define AUDIT_SUCCESS 1
39 #define AUDIT_FAILURE 0
42 * Policy checking flags
45 enum xpolicy_flags {
46 TSOL_MAC = 0x00000001, /* MAC policy */
47 TSOL_DAC = 0x00000002, /* DAC floating */
48 TSOL_FLOAT = 0x00000004, /* float ILs */
49 TSOL_AUDIT = 0x00000008, /* perform auditing */
50 TSOL_PRIV = 0x00000010, /* privilege check */
51 TSOL_TP = 0x00000020, /* Trusted Path check */
52 TSOL_READOP = 0x00000040, /* read operation */
53 TSOL_WRITEOP = 0x00000080, /* write operation */
54 TSOL_OWNER = 0x00000100, /* Check for workstation owner */
55 TSOL_DOMINATE = 0x00000200, /* Check for default uid */
56 TSOL_ALL = 0x0fffffff /* do them all */
59 typedef enum xpolicy_flags xpolicy_t;
61 #define XTSOL_FAIL 1 /* Replaces SecurityErrorOperation */
62 #define XTSOL_ALLOW 2 /* Replaces SecurityAllowOperation */
63 #define XTSOL_IGNORE 3 /* Replaces SecurityIgnoreOperation */
66 #ifndef MAJOROP
67 #define MAJOROP ((xReq *)client->requestBuffer)->reqType
68 #endif /* MAJOROP */
69 #define RES_TYPE(xid) ((xid) & (0x8000000F))
73 * Function prototypes
76 void init_win_privsets(void);
77 void free_win_privsets(void);
79 #ifdef __cplusplus
81 #endif
83 #endif /* _TSOL_POLICY_H */