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

« back to all changes in this revision

Viewing changes to unix/xc/programs/lbxproxy/include/cache.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: cache.h,v 1.4 2001/02/09 02:05:32 xorgcvs Exp $ */
 
2
/*
 
3
Copyright 1994, 1998  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
 
12
included in all copies or substantial portions of the Software.
 
13
 
 
14
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 
15
EXPRESS 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
*/
 
28
/*
 
29
 * Copyright 1990, 1991 Network Computing Devices;
 
30
 * Portions Copyright 1987 by Digital Equipment Corporation
 
31
 *
 
32
 * Permission to use, copy, modify, distribute, and sell this software and its
 
33
 * documentation for any purpose is hereby granted without fee, provided that
 
34
 * the above copyright notice appear in all copies and that both that
 
35
 * copyright notice and this permission notice appear in supporting
 
36
 * documentation, and that the names of Network Computing Devices
 
37
 * or Digital not be used in advertising or
 
38
 * publicity pertaining to distribution of the software without specific,
 
39
 * written prior permission.  Network Computing Devices and Digital
 
40
 * make no representations about the
 
41
 * suitability of this software for any purpose.  It is provided "as is"
 
42
 * without express or implied warranty.
 
43
 *
 
44
 * NETWORK COMPUTING DEVICES AND DIGITAL DISCLAIM ALL WARRANTIES WITH
 
45
 * REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
 
46
 * AND FITNESS, IN NO EVENT SHALL NETWORK COMPUTING DEVICES OR DIGITAL BE
 
47
 * LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
 
48
 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
 
49
 * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
 
50
 * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 
51
 *
 
52
 */
 
53
 
 
54
#ifndef _CACHE_H_
 
55
#define _CACHE_H_
 
56
 
 
57
#define CacheWasReset           1
 
58
#define CacheEntryFreed         2
 
59
#define CacheEntryOld           3
 
60
 
 
61
#define MAX_NUM_CACHES  2
 
62
 
 
63
typedef unsigned long CacheID;
 
64
typedef unsigned long Cache;
 
65
typedef void (*CacheFree) ();
 
66
 
 
67
typedef struct _cache *CachePtr;
 
68
 
 
69
extern Cache CacheInit(
 
70
#if NeedFunctionPrototypes
 
71
    XServerPtr /*server*/,
 
72
    unsigned long /*maxsize*/
 
73
#endif
 
74
);
 
75
 
 
76
extern void CacheFreeCache(
 
77
#if NeedFunctionPrototypes
 
78
    XServerPtr /*server*/,
 
79
    Cache /*cid*/
 
80
#endif
 
81
);
 
82
 
 
83
extern Bool CacheTrimNeeded(
 
84
#if NeedFunctionPrototypes
 
85
    XServerPtr /*server*/,
 
86
    Cache /*cid*/
 
87
#endif
 
88
);
 
89
 
 
90
extern void CacheTrim(
 
91
#if NeedFunctionPrototypes
 
92
    XServerPtr /*server*/,
 
93
    Cache /*cid*/
 
94
#endif
 
95
);
 
96
 
 
97
extern Bool CacheStoreMemory(
 
98
#if NeedFunctionPrototypes
 
99
    XServerPtr /*server*/,
 
100
    Cache /*cid*/,
 
101
    CacheID /*id*/,
 
102
    pointer /*data*/,
 
103
    unsigned long /*size*/,
 
104
    CacheFree /*free_func*/,
 
105
    Bool /*can_flush*/
 
106
#endif
 
107
);
 
108
 
 
109
extern pointer CacheFetchMemory(
 
110
#if NeedFunctionPrototypes
 
111
    XServerPtr /*server*/,
 
112
    Cache /*cid*/,
 
113
    CacheID /*id*/,
 
114
    Bool /*update*/
 
115
#endif
 
116
);
 
117
 
 
118
extern void CacheFreeMemory(
 
119
#if NeedFunctionPrototypes
 
120
    XServerPtr /*server*/,
 
121
    Cache /*cacheid*/,
 
122
    CacheID /*cid*/,
 
123
    Bool /*notify*/
 
124
#endif
 
125
);
 
126
 
 
127
#endif                          /* _CACHE_H_ */