jpayne@69: /* jpayne@69: Copyright 1996, 1998 The Open Group jpayne@69: jpayne@69: Permission to use, copy, modify, distribute, and sell this software and its jpayne@69: documentation for any purpose is hereby granted without fee, provided that jpayne@69: the above copyright notice appear in all copies and that both that jpayne@69: copyright notice and this permission notice appear in supporting jpayne@69: documentation. jpayne@69: jpayne@69: The above copyright notice and this permission notice shall be included jpayne@69: in all copies or substantial portions of the Software. jpayne@69: jpayne@69: THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS jpayne@69: OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF jpayne@69: MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. jpayne@69: IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR jpayne@69: OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, jpayne@69: ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR jpayne@69: OTHER DEALINGS IN THE SOFTWARE. jpayne@69: jpayne@69: Except as contained in this notice, the name of The Open Group shall jpayne@69: not be used in advertising or otherwise to promote the sale, use or jpayne@69: other dealings in this Software without prior written authorization jpayne@69: from The Open Group. jpayne@69: */ jpayne@69: jpayne@69: #ifndef _SECURITY_H jpayne@69: #define _SECURITY_H jpayne@69: jpayne@69: #define _XAUTH_STRUCT_ONLY jpayne@69: #include jpayne@69: jpayne@69: #include jpayne@69: jpayne@69: _XFUNCPROTOBEGIN jpayne@69: jpayne@69: Status XSecurityQueryExtension ( jpayne@69: Display *dpy, jpayne@69: int *major_version_return, jpayne@69: int *minor_version_return); jpayne@69: jpayne@69: Xauth *XSecurityAllocXauth(void); jpayne@69: jpayne@69: void XSecurityFreeXauth(Xauth *auth); jpayne@69: jpayne@69: /* type for returned auth ids */ jpayne@69: typedef unsigned long XSecurityAuthorization; jpayne@69: jpayne@69: typedef struct { jpayne@69: unsigned int timeout; jpayne@69: unsigned int trust_level; jpayne@69: XID group; jpayne@69: long event_mask; jpayne@69: } XSecurityAuthorizationAttributes; jpayne@69: jpayne@69: Xauth *XSecurityGenerateAuthorization( jpayne@69: Display *dpy, jpayne@69: Xauth *auth_in, jpayne@69: unsigned long valuemask, jpayne@69: XSecurityAuthorizationAttributes *attributes, jpayne@69: XSecurityAuthorization *auth_id_return); jpayne@69: jpayne@69: Status XSecurityRevokeAuthorization( jpayne@69: Display *dpy, jpayne@69: XSecurityAuthorization auth_id); jpayne@69: jpayne@69: _XFUNCPROTOEND jpayne@69: jpayne@69: typedef struct { jpayne@69: int type; /* event base + XSecurityAuthorizationRevoked */ jpayne@69: unsigned long serial; /* # of last request processed by server */ jpayne@69: Bool send_event; /* true if this came from a SendEvent request */ jpayne@69: Display *display; /* Display the event was read from */ jpayne@69: XSecurityAuthorization auth_id; /* revoked authorization id */ jpayne@69: } XSecurityAuthorizationRevokedEvent; jpayne@69: jpayne@69: #endif /* _SECURITY_H */