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

« back to all changes in this revision

Viewing changes to unix/xc/include/extensions/Xagstr.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
/* $XFree86: xc/include/extensions/Xagstr.h,v 1.5 2001/12/17 20:52:24 dawes Exp $ */
 
2
/*
 
3
Copyright 1996, 1998, 2001  The Open Group
 
4
 
 
5
Permission to use, copy, modify, distribute, and sell this software and its
 
6
documentation for any purpose is hereby granted without fee, provided that
 
7
the above copyright notice appear in all copies and that both that
 
8
copyright notice and this permission notice appear in supporting
 
9
documentation.
 
10
 
 
11
The above copyright notice and this permission notice shall be included
 
12
in all copies or substantial portions of the Software.
 
13
 
 
14
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
 
15
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 
16
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
 
17
IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
 
18
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
 
19
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
 
20
OTHER DEALINGS IN THE SOFTWARE.
 
21
 
 
22
Except as contained in this notice, the name of The Open Group shall
 
23
not be used in advertising or otherwise to promote the sale, use or
 
24
other dealings in this Software without prior written authorization
 
25
from The Open Group.
 
26
*/
 
27
/* $Xorg: Xagstr.h,v 1.6 2001/02/09 02:03:24 xorgcvs Exp $ */
 
28
 
 
29
#ifndef _XAGSTR_H_ /* { */
 
30
#define _XAGSTR_H_
 
31
 
 
32
#include <X11/extensions/Xag.h>
 
33
 
 
34
#define XAppGroup CARD32
 
35
 
 
36
#define XAGNAME "XC-APPGROUP"
 
37
 
 
38
#define XAG_MAJOR_VERSION       1       /* current version numbers */
 
39
#define XAG_MINOR_VERSION       0
 
40
 
 
41
#define XagWindowTypeX11        0
 
42
#define XagWindowTypeMacintosh  1
 
43
#define XagWindowTypeWin32      2
 
44
#define XagWindowTypeWin16      3
 
45
 
 
46
/*
 
47
* Redefine some basic types used by structures defined herein.  This allows
 
48
* both the library and server to view communicated data as 32-bit entities,
 
49
* thus preventing problems on 64-bit architectures where libXext sees this
 
50
* data as 64 bits and the server sees it as 32 bits.
 
51
*/
 
52
 
 
53
#define Colormap CARD32
 
54
#define VisualID CARD32
 
55
#define Window CARD32
 
56
 
 
57
typedef struct _XagQueryVersion {
 
58
    CARD8       reqType;        /* always XagReqCode */
 
59
    CARD8       xagReqType;     /* always X_XagQueryVersion */
 
60
    CARD16      length B16;
 
61
    CARD16      client_major_version B16;
 
62
    CARD16      client_minor_version B16;
 
63
} xXagQueryVersionReq;
 
64
#define sz_xXagQueryVersionReq          8
 
65
 
 
66
typedef struct {
 
67
    BYTE        type;           /* X_Reply */
 
68
    BOOL        pad1;
 
69
    CARD16      sequence_number B16;
 
70
    CARD32      length B32;
 
71
    CARD16      server_major_version B16;
 
72
    CARD16      server_minor_version B16;
 
73
    CARD32      pad2 B32;
 
74
    CARD32      pad3 B32;
 
75
    CARD32      pad4 B32;
 
76
    CARD32      pad5 B32;
 
77
    CARD32      pad6 B32;
 
78
} xXagQueryVersionReply;
 
79
#define sz_xXagQueryVersionReply        32
 
80
 
 
81
/* Set AppGroup Attributes masks */
 
82
#define XagSingleScreenMask             1 << 0
 
83
#define XagDefaultRootMask              1 << XagNdefaultRoot
 
84
#define XagRootVisualMask               1 << XagNrootVisual
 
85
#define XagDefaultColormapMask          1 << XagNdefaultColormap
 
86
#define XagBlackPixelMask               1 << XagNblackPixel
 
87
#define XagWhitePixelMask               1 << XagNwhitePixel
 
88
#define XagAppGroupLeaderMask           1 << XagNappGroupLeader
 
89
 
 
90
typedef struct _XagCreate {
 
91
    CARD8       reqType;        /* always XagReqCode */
 
92
    CARD8       xagReqType;     /* always X_XagCreate */
 
93
    CARD16      length B16;
 
94
    XAppGroup   app_group B32;
 
95
    CARD32      attrib_mask B32; /* LISTofVALUE follows */
 
96
} xXagCreateReq;
 
97
#define sz_xXagCreateReq                12
 
98
 
 
99
typedef struct _XagDestroy {
 
100
    CARD8       reqType;        /* always XagReqCode */
 
101
    CARD8       xagReqType;     /* always X_XagDestroy */
 
102
    CARD16      length B16;
 
103
    XAppGroup   app_group  B32;
 
104
} xXagDestroyReq;
 
105
#define sz_xXagDestroyReq               8
 
106
 
 
107
typedef struct _XagGetAttr {
 
108
    CARD8       reqType;        /* always XagReqCode */
 
109
    CARD8       xagReqType;     /* always X_XagGetAttr */
 
110
    CARD16      length B16;
 
111
    XAppGroup   app_group B32;
 
112
} xXagGetAttrReq;
 
113
#define sz_xXagGetAttrReq               8
 
114
 
 
115
typedef struct {
 
116
    BYTE        type;           /* X_Reply */
 
117
    BOOL        pad1;
 
118
    CARD16      sequence_number B16;
 
119
    CARD32      length B32;
 
120
    Window      default_root B32;
 
121
    VisualID    root_visual B32;
 
122
    Colormap    default_colormap B32;
 
123
    CARD32      black_pixel B32;
 
124
    CARD32      white_pixel B32;
 
125
    BOOL        single_screen;
 
126
    BOOL        app_group_leader;
 
127
    CARD16      pad2 B16;
 
128
} xXagGetAttrReply;
 
129
#define sz_xXagGetAttrReply             32
 
130
 
 
131
typedef struct _XagQuery {
 
132
    CARD8       reqType;        /* always XagReqCode */
 
133
    CARD8       xagReqType;     /* always X_XagQuery */
 
134
    CARD16      length B16;
 
135
    CARD32      resource B32;
 
136
} xXagQueryReq;
 
137
#define sz_xXagQueryReq                 8
 
138
 
 
139
typedef struct {
 
140
    BYTE        type;           /* X_Reply */
 
141
    BOOL        pad1;
 
142
    CARD16      sequence_number B16;
 
143
    CARD32      length B32;
 
144
    XAppGroup   app_group B32;
 
145
    CARD32      pad2 B32;
 
146
    CARD32      pad3 B32;
 
147
    CARD32      pad4 B32;
 
148
    CARD32      pad5 B32;
 
149
    CARD32      pad6 B32;
 
150
} xXagQueryReply;
 
151
#define sz_xXagQueryReply               32
 
152
 
 
153
typedef struct _XagCreateAssoc {
 
154
    CARD8       reqType;        /* always XagReqCode */
 
155
    CARD8       xagReqType;     /* always X_XagCreateAssoc */
 
156
    CARD16      length B16;
 
157
    Window      window B32;
 
158
    CARD16      window_type B16;
 
159
    CARD16      system_window_len B16; /* LISTofCARD8 follows */
 
160
} xXagCreateAssocReq;
 
161
#define sz_xXagCreateAssocReq           12
 
162
 
 
163
typedef struct _XagDestroyAssoc {
 
164
    CARD8       reqType;        /* always XagReqCode */
 
165
    CARD8       xagReqType;     /* always X_XagDestroyAssoc */
 
166
    CARD16      length B16;
 
167
    Window      window B32;
 
168
} xXagDestroyAssocReq;
 
169
#define sz_xXagDestroyAssocReq          8
 
170
 
 
171
#undef XAppGroup
 
172
/*
 
173
 * Cancel the previous redefinition of the basic types, thus restoring their
 
174
 * X.h definitions.
 
175
 */
 
176
 
 
177
#undef Window
 
178
#undef Colormap
 
179
#undef VisualID
 
180
 
 
181
#endif /* } _XAGSTR_H_ */
 
182