a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync/*
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsyncCopyright 1996, 1998 The Open Group
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsyncPermission to use, copy, modify, distribute, and sell this software and its
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsyncdocumentation for any purpose is hereby granted without fee, provided that
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsyncthe above copyright notice appear in all copies and that both that
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsynccopyright notice and this permission notice appear in supporting
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsyncdocumentation.
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsyncThe above copyright notice and this permission notice shall be included
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsyncin all copies or substantial portions of the Software.
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsyncTHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsyncOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsyncMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsyncIN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsyncOTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsyncARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsyncOTHER DEALINGS IN THE SOFTWARE.
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsyncExcept as contained in this notice, the name of The Open Group shall
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsyncnot be used in advertising or otherwise to promote the sale, use or
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsyncother dealings in this Software without prior written authorization
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsyncfrom The Open Group.
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync*/
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync/* Xserver internals for Security extension - moved here from
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync _SECURITY_SERVER section of <X11/extensions/security.h> */
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync#ifndef _SECURITY_SRV_H
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync#define _SECURITY_SRV_H
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync/* Allow client side portions of <X11/extensions/security.h> to compile */
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync#ifndef Status
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync#define Status int
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync#define NEED_UNDEF_Status
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync#endif
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync#ifndef Display
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync#define Display void
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync#define NEED_UNDEF_Display
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync#endif
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync#include <X11/extensions/secur.h>
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync#ifdef NEED_UNDEF_Status
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync#undef Status
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync#undef NEED_UNDEF_Status
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync#endif
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync#ifdef NEED_UNDEF_Display
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync#undef Display
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync#undef NEED_UNDEF_Display
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync#endif
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync#include "input.h" /* for DeviceIntPtr */
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync#include "property.h" /* for PropertyPtr */
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync#include "pixmap.h" /* for DrawablePtr */
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync#include "resource.h" /* for RESTYPE */
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync/* resource type to pass in LookupIDByType for authorizations */
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsyncextern RESTYPE SecurityAuthorizationResType;
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync/* this is what we store for an authorization */
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsynctypedef struct {
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync XID id; /* resource ID */
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync CARD32 timeout; /* how long to live in seconds after refcnt == 0 */
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync unsigned int trustLevel; /* trusted/untrusted */
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync XID group; /* see embedding extension */
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync unsigned int refcnt; /* how many clients connected with this auth */
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync unsigned int secondsRemaining; /* overflow time amount for >49 days */
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync OsTimerPtr timer; /* timer for this auth */
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync struct _OtherClients *eventClients; /* clients wanting events */
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync} SecurityAuthorizationRec, *SecurityAuthorizationPtr;
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsynctypedef struct {
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync XID group; /* the group that was sent in GenerateAuthorization */
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync Bool valid; /* did anyone recognize it? if so, set to TRUE */
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync} SecurityValidateGroupInfoRec;
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync/* Give this value or higher to the -audit option to get security messages */
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync#define SECURITY_AUDIT_LEVEL 4
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync#endif /* _SECURITY_SRV_H */