security.h revision 485f0483
1485f0483Smrg/* $Xorg: security.h,v 1.4 2001/02/09 02:03:24 xorgcvs Exp $ */ 2485f0483Smrg/* 3485f0483SmrgCopyright 1996, 1998 The Open Group 4485f0483Smrg 5485f0483SmrgPermission to use, copy, modify, distribute, and sell this software and its 6485f0483Smrgdocumentation for any purpose is hereby granted without fee, provided that 7485f0483Smrgthe above copyright notice appear in all copies and that both that 8485f0483Smrgcopyright notice and this permission notice appear in supporting 9485f0483Smrgdocumentation. 10485f0483Smrg 11485f0483SmrgThe above copyright notice and this permission notice shall be included 12485f0483Smrgin all copies or substantial portions of the Software. 13485f0483Smrg 14485f0483SmrgTHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 15485f0483SmrgOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16485f0483SmrgMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 17485f0483SmrgIN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 18485f0483SmrgOTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 19485f0483SmrgARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 20485f0483SmrgOTHER DEALINGS IN THE SOFTWARE. 21485f0483Smrg 22485f0483SmrgExcept as contained in this notice, the name of The Open Group shall 23485f0483Smrgnot be used in advertising or otherwise to promote the sale, use or 24485f0483Smrgother dealings in this Software without prior written authorization 25485f0483Smrgfrom The Open Group. 26485f0483Smrg*/ 27485f0483Smrg/* $XFree86: xc/include/extensions/security.h,v 1.3 2001/12/14 19:53:29 dawes Exp $ */ 28485f0483Smrg 29485f0483Smrg#ifndef _SECURITY_H 30485f0483Smrg#define _SECURITY_H 31485f0483Smrg 32485f0483Smrg#define _XAUTH_STRUCT_ONLY 33485f0483Smrg#include <X11/Xauth.h> 34485f0483Smrg 35485f0483Smrg#include <X11/extensions/secur.h> 36485f0483Smrg 37485f0483Smrg_XFUNCPROTOBEGIN 38485f0483Smrg 39485f0483SmrgStatus XSecurityQueryExtension ( 40485f0483Smrg Display *dpy, 41485f0483Smrg int *major_version_return, 42485f0483Smrg int *minor_version_return); 43485f0483Smrg 44485f0483SmrgXauth *XSecurityAllocXauth(void); 45485f0483Smrg 46485f0483Smrgvoid XSecurityFreeXauth(Xauth *auth); 47485f0483Smrg 48485f0483Smrg/* type for returned auth ids */ 49485f0483Smrgtypedef unsigned long XSecurityAuthorization; 50485f0483Smrg 51485f0483Smrgtypedef struct { 52485f0483Smrg unsigned int timeout; 53485f0483Smrg unsigned int trust_level; 54485f0483Smrg XID group; 55485f0483Smrg long event_mask; 56485f0483Smrg} XSecurityAuthorizationAttributes; 57485f0483Smrg 58485f0483SmrgXauth *XSecurityGenerateAuthorization( 59485f0483Smrg Display *dpy, 60485f0483Smrg Xauth *auth_in, 61485f0483Smrg unsigned long valuemask, 62485f0483Smrg XSecurityAuthorizationAttributes *attributes, 63485f0483Smrg XSecurityAuthorization *auth_id_return); 64485f0483Smrg 65485f0483SmrgStatus XSecurityRevokeAuthorization( 66485f0483Smrg Display *dpy, 67485f0483Smrg XSecurityAuthorization auth_id); 68485f0483Smrg 69485f0483Smrg_XFUNCPROTOEND 70485f0483Smrg 71485f0483Smrgtypedef struct { 72485f0483Smrg int type; /* event base + XSecurityAuthorizationRevoked */ 73485f0483Smrg unsigned long serial; /* # of last request processed by server */ 74485f0483Smrg Bool send_event; /* true if this came from a SendEvent request */ 75485f0483Smrg Display *display; /* Display the event was read from */ 76485f0483Smrg XSecurityAuthorization auth_id; /* revoked authorization id */ 77485f0483Smrg} XSecurityAuthorizationRevokedEvent; 78485f0483Smrg 79485f0483Smrg#endif /* _SECURITY_H */ 80