blob: be7a86203b65ad388c45c469cbe8c65e4ef0b72c [file] [log] [blame]
David 'Digit' Turner1b0544d2014-03-27 13:51:24 +01001/* $Xorg: security.h,v 1.4 2001/02/09 02:03:24 xorgcvs Exp $ */
2/*
3Copyright 1996, 1998 The Open Group
4
5Permission to use, copy, modify, distribute, and sell this software and its
6documentation for any purpose is hereby granted without fee, provided that
7the above copyright notice appear in all copies and that both that
8copyright notice and this permission notice appear in supporting
9documentation.
10
11The above copyright notice and this permission notice shall be included
12in all copies or substantial portions of the Software.
13
14THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
15OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
17IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
18OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
19ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
20OTHER DEALINGS IN THE SOFTWARE.
21
22Except as contained in this notice, the name of The Open Group shall
23not be used in advertising or otherwise to promote the sale, use or
24other dealings in this Software without prior written authorization
25from The Open Group.
26*/
27/* $XFree86: xc/include/extensions/security.h,v 1.3 2001/12/14 19:53:29 dawes Exp $ */
28
29#ifndef _SECURITY_H
30#define _SECURITY_H
31
32#define _XAUTH_STRUCT_ONLY
33#include <X11/Xauth.h>
34
35#include <X11/extensions/secur.h>
36
37_XFUNCPROTOBEGIN
38
39Status XSecurityQueryExtension (
40 Display *dpy,
41 int *major_version_return,
42 int *minor_version_return);
43
44Xauth *XSecurityAllocXauth(void);
45
46void XSecurityFreeXauth(Xauth *auth);
47
48/* type for returned auth ids */
49typedef unsigned long XSecurityAuthorization;
50
51typedef struct {
52 unsigned int timeout;
53 unsigned int trust_level;
54 XID group;
55 long event_mask;
56} XSecurityAuthorizationAttributes;
57
58Xauth *XSecurityGenerateAuthorization(
59 Display *dpy,
60 Xauth *auth_in,
61 unsigned long valuemask,
62 XSecurityAuthorizationAttributes *attributes,
63 XSecurityAuthorization *auth_id_return);
64
65Status XSecurityRevokeAuthorization(
66 Display *dpy,
67 XSecurityAuthorization auth_id);
68
69_XFUNCPROTOEND
70
71typedef struct {
72 int type; /* event base + XSecurityAuthorizationRevoked */
73 unsigned long serial; /* # of last request processed by server */
74 Bool send_event; /* true if this came from a SendEvent request */
75 Display *display; /* Display the event was read from */
76 XSecurityAuthorization auth_id; /* revoked authorization id */
77} XSecurityAuthorizationRevokedEvent;
78
79#endif /* _SECURITY_H */