From 7cfdafd5ec565502a40e9e1f5b3edbb2be6aafbc Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 25 Jun 2009 11:30:17 +1000 Subject: [PATCH] security: remove security.h, split into secur.h Rename securstr.h to securproto.h --- Makefile.am | 4 +-- security.h => secur.h | 62 +++++--------------------------------- securstr.h => securproto.h | 14 +++------ 3 files changed, 14 insertions(+), 66 deletions(-) rename security.h => secur.h (60%) rename securstr.h => securproto.h (93%) diff --git a/Makefile.am b/Makefile.am index 5ae3920..452a58d 100644 --- a/Makefile.am +++ b/Makefile.am @@ -10,8 +10,8 @@ xext_HEADERS = \ mitmiscproto.h \ multibufconst.h \ multibufproto.h \ - security.h \ - securstr.h \ + secur.h \ + securproto.h \ shape.h \ shapestr.h \ shm.h \ diff --git a/security.h b/secur.h similarity index 60% rename from security.h rename to secur.h index fc7ade2..7a0b34a 100644 --- a/security.h +++ b/secur.h @@ -26,13 +26,12 @@ from The Open Group. */ /* $XFree86: xc/include/extensions/security.h,v 1.3 2001/12/14 19:53:29 dawes Exp $ */ -#ifndef _SECURITY_H -#define _SECURITY_H +#ifndef _SECUR_H +#define _SECUR_H -#define _XAUTH_STRUCT_ONLY -#include - -/* constants that server, library, and application all need */ +#define SECURITY_EXTENSION_NAME "SECURITY" +#define SECURITY_MAJOR_VERSION 1 +#define SECURITY_MINOR_VERSION 0 #define XSecurityNumberEvents 1 #define XSecurityNumberErrors 2 @@ -57,55 +56,8 @@ from The Open Group. /* event offsets */ #define XSecurityAuthorizationRevoked 0 - + #define XSecurityAuthorizationName "XC-QUERY-SECURITY-1" #define XSecurityAuthorizationNameLen 19 - -#ifndef _SECURITY_SERVER - -_XFUNCPROTOBEGIN - -Status XSecurityQueryExtension ( - Display *dpy, - int *major_version_return, - int *minor_version_return); - -Xauth *XSecurityAllocXauth(void); - -void XSecurityFreeXauth(Xauth *auth); - -/* type for returned auth ids */ -typedef unsigned long XSecurityAuthorization; - -typedef struct { - unsigned int timeout; - unsigned int trust_level; - XID group; - long event_mask; -} XSecurityAuthorizationAttributes; - -Xauth *XSecurityGenerateAuthorization( - Display *dpy, - Xauth *auth_in, - unsigned long valuemask, - XSecurityAuthorizationAttributes *attributes, - XSecurityAuthorization *auth_id_return); - -Status XSecurityRevokeAuthorization( - Display *dpy, - XSecurityAuthorization auth_id); - -_XFUNCPROTOEND - -typedef struct { - int type; /* event base + XSecurityAuthorizationRevoked */ - unsigned long serial; /* # of last request processed by server */ - Bool send_event; /* true if this came from a SendEvent request */ - Display *display; /* Display the event was read from */ - XSecurityAuthorization auth_id; /* revoked authorization id */ -} XSecurityAuthorizationRevokedEvent; - -#endif /* _SECURITY_SERVER */ - -#endif /* _SECURITY_H */ +#endif /* _SECUR_H */ diff --git a/securstr.h b/securproto.h similarity index 93% rename from securstr.h rename to securproto.h index 50c7644..d954250 100644 --- a/securstr.h +++ b/securproto.h @@ -26,14 +26,10 @@ from The Open Group. */ /* $XFree86: xc/include/extensions/securstr.h,v 1.2 2001/08/01 00:44:35 tsi Exp $ */ -#ifndef _SECURSTR_H -#define _SECURSTR_H +#ifndef _SECURPROTO_H +#define _SECURPROTO_H -#include - -#define SECURITY_EXTENSION_NAME "SECURITY" -#define SECURITY_MAJOR_VERSION 1 -#define SECURITY_MINOR_VERSION 0 +#include #define X_SecurityQueryVersion 0 #define X_SecurityGenerateAuthorization 1 @@ -69,7 +65,7 @@ typedef struct { CARD16 length B16; CARD16 nbytesAuthProto B16; CARD16 nbytesAuthData B16; - CARD32 valueMask B32; + CARD32 valueMask B32; /* auth protocol name padded to 4 bytes */ /* auth protocol data padded to 4 bytes */ /* list of CARD32 values, if any */ @@ -113,4 +109,4 @@ typedef struct _xSecurityAuthorizationRevokedEvent { } xSecurityAuthorizationRevokedEvent; #define sz_xSecurityAuthorizationRevokedEvent 32 -#endif /* _SECURSTR_H */ +#endif /* _SECURPROTO_H */