~ubuntu-branches/ubuntu/gutsy/vnc4/gutsy

« back to all changes in this revision

Viewing changes to unix/xc/programs/lbxproxy/include/resource.h

  • Committer: Bazaar Package Importer
  • Author(s): Ola Lundqvist
  • Date: 2006-05-15 20:35:17 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20060515203517-l4lre1ku942mn26k
Tags: 4.1.1+X4.3.0-10
* Correction of critical security issue. Thanks to Martin Kogler
  <e9925248@student.tuwien.ac.at> that informed me about the issue,
  and provided the patch.
  This flaw was originally found by Steve Wiseman of intelliadmin.com.
* Applied patch from Javier Kohen <jkohen@users.sourceforge.net> that
  inform the user that only 8 first characters of the password will
  actually be used when typing more than 8 characters, closes:
  #355619.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* $Xorg: resource.h,v 1.4 2001/02/09 02:05:32 xorgcvs Exp $ */
 
2
 
 
3
/*
 
4
 
 
5
Copyright 1995, 1998  The Open Group
 
6
 
 
7
Permission to use, copy, modify, distribute, and sell this software and its
 
8
documentation for any purpose is hereby granted without fee, provided that
 
9
the above copyright notice appear in all copies and that both that
 
10
copyright notice and this permission notice appear in supporting
 
11
documentation.
 
12
 
 
13
The above copyright notice and this permission notice shall be
 
14
included in all copies or substantial portions of the Software.
 
15
 
 
16
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 
17
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 
18
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
 
19
IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
 
20
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
 
21
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
 
22
OTHER DEALINGS IN THE SOFTWARE.
 
23
 
 
24
Except as contained in this notice, the name of The Open Group shall
 
25
not be used in advertising or otherwise to promote the sale, use or
 
26
other dealings in this Software without prior written authorization
 
27
from The Open Group.
 
28
 
 
29
*/
 
30
 
 
31
#ifndef RESOURCE_H
 
32
#define RESOURCE_H 1
 
33
 
 
34
#define RT_COLORMAP     ((RESTYPE)1)
 
35
#define RT_CMAPENTRY    ((RESTYPE)2)
 
36
#define RT_LASTPREDEF   ((RESTYPE)2)
 
37
#define RT_NONE         ((RESTYPE)0)
 
38
 
 
39
#define RC_NEVERRETAIN  ((RESTYPE)1<<29)
 
40
#define RC_LASTPREDEF   RC_NEVERRETAIN
 
41
#define RC_ANY          (~(RESTYPE)0)
 
42
 
 
43
typedef unsigned long RESTYPE;
 
44
 
 
45
typedef struct _Resource {
 
46
    struct _Resource    *next;
 
47
    XID                 id;
 
48
    RESTYPE             type;
 
49
    pointer             value;
 
50
} ResourceRec, *ResourcePtr;
 
51
#define NullResource ((ResourcePtr)NULL)
 
52
 
 
53
typedef struct _ClientResource {
 
54
    ResourcePtr *resources;
 
55
    int         elements;
 
56
    int         buckets;
 
57
    int         hashsize;       /* log(2)(buckets) */
 
58
    XID         fakeID;
 
59
    XID         endFakeID;
 
60
} ClientResourceRec;
 
61
 
 
62
 
 
63
/* bits and fields within a resource id */
 
64
#define PROXY_BIT               0x40000000              /* use illegal bit */
 
65
 
 
66
typedef int (*DeleteType)(
 
67
#if NeedNestedPrototypes
 
68
    ClientPtr /*client*/,
 
69
    pointer /*value*/,
 
70
    XID /*id*/
 
71
#endif
 
72
);
 
73
 
 
74
extern Bool InitDeleteFuncs(
 
75
#if NeedFunctionPrototypes
 
76
    void
 
77
#endif
 
78
);
 
79
 
 
80
extern Bool InitClientResources(
 
81
#if NeedFunctionPrototypes
 
82
    ClientPtr /*client*/
 
83
#endif
 
84
);
 
85
 
 
86
extern void FinishInitClientResources(
 
87
#if NeedFunctionPrototypes
 
88
    ClientPtr /*client*/,
 
89
    XID /*ridBase*/,
 
90
    XID /*ridMask*/
 
91
#endif
 
92
);
 
93
 
 
94
extern XID FakeClientID(
 
95
#if NeedFunctionPrototypes
 
96
    int /*client*/
 
97
#endif
 
98
);
 
99
 
 
100
extern Bool AddResource(
 
101
#if NeedFunctionPrototypes
 
102
    ClientPtr /*client*/,
 
103
    XID /*id*/,
 
104
    RESTYPE /*type*/,
 
105
    pointer /*value*/
 
106
#endif
 
107
);
 
108
 
 
109
extern void FreeResource(
 
110
#if NeedFunctionPrototypes
 
111
    ClientPtr /*client*/,
 
112
    XID /*id*/,
 
113
    RESTYPE /*skipDeleteFuncType*/
 
114
#endif
 
115
);
 
116
 
 
117
extern void FreeClientResources(
 
118
#if NeedFunctionPrototypes
 
119
    ClientPtr /*client*/
 
120
#endif
 
121
);
 
122
 
 
123
extern void FreeAllResources(
 
124
#if NeedFunctionPrototypes
 
125
    void
 
126
#endif
 
127
);
 
128
 
 
129
extern pointer LookupIDByType(
 
130
#if NeedFunctionPrototypes
 
131
    ClientPtr /*client*/,
 
132
    XID /*id*/,
 
133
    RESTYPE /*rtype*/
 
134
#endif
 
135
);
 
136
 
 
137
#endif