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