1 /* $Xorg: security.h,v 1.4 2001/02/09 02:03:24 xorgcvs Exp $ */ 2 /* 3 Copyright 1996, 1998 The Open Group 4 5 Permission to use, copy, modify, distribute, and sell this software and its 6 documentation for any purpose is hereby granted without fee, provided that 7 the above copyright notice appear in all copies and that both that 8 copyright notice and this permission notice appear in supporting 9 documentation. 10 11 The above copyright notice and this permission notice shall be included 12 in all copies or substantial portions of the Software. 13 14 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 15 OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 17 IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 18 OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 19 ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 20 OTHER DEALINGS IN THE SOFTWARE. 21 22 Except as contained in this notice, the name of The Open Group shall 23 not be used in advertising or otherwise to promote the sale, use or 24 other dealings in this Software without prior written authorization 25 from 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 39 Status XSecurityQueryExtension ( 40 Display *dpy, 41 int *major_version_return, 42 int *minor_version_return); 43 44 Xauth *XSecurityAllocXauth(void); 45 46 void XSecurityFreeXauth(Xauth *auth); 47 48 /* type for returned auth ids */ 49 typedef unsigned long XSecurityAuthorization; 50 51 typedef struct { 52 unsigned int timeout; 53 unsigned int trust_level; 54 XID group; 55 long event_mask; 56 } XSecurityAuthorizationAttributes; 57 58 Xauth *XSecurityGenerateAuthorization( 59 Display *dpy, 60 Xauth *auth_in, 61 unsigned long valuemask, 62 XSecurityAuthorizationAttributes *attributes, 63 XSecurityAuthorization *auth_id_return); 64 65 Status XSecurityRevokeAuthorization( 66 Display *dpy, 67 XSecurityAuthorization auth_id); 68 69 _XFUNCPROTOEND 70 71 typedef 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 */ 80