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

« back to all changes in this revision

Viewing changes to unix/xc/programs/xman/vendor.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
/* $XConsortium: vendor.h,v 1.12 94/04/17 20:44:00 rws Exp $ */
 
2
/*
 
3
 
 
4
Copyright (c) 1991  X Consortium
 
5
 
 
6
Permission is hereby granted, free of charge, to any person obtaining
 
7
a copy of this software and associated documentation files (the
 
8
"Software"), to deal in the Software without restriction, including
 
9
without limitation the rights to use, copy, modify, merge, publish,
 
10
distribute, sublicense, and/or sell copies of the Software, and to
 
11
permit persons to whom the Software is furnished to do so, subject to
 
12
the following conditions:
 
13
 
 
14
The above copyright notice and this permission notice shall be included
 
15
in all copies or substantial portions of the Software.
 
16
 
 
17
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
 
18
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 
19
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
 
20
IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR
 
21
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
 
22
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
 
23
OTHER DEALINGS IN THE SOFTWARE.
 
24
 
 
25
Except as contained in this notice, the name of the X Consortium shall
 
26
not be used in advertising or otherwise to promote the sale, use or
 
27
other dealings in this Software without prior written authorization
 
28
from the X Consortium.
 
29
 
 
30
*/
 
31
/* $XFree86: xc/programs/xman/vendor.h,v 1.11 2002/09/21 02:38:25 dawes Exp $ */
 
32
 
 
33
/* Vendor-specific definitions */
 
34
 
 
35
#ifdef CSRG_BASED
 
36
#include <sys/param.h>
 
37
#endif
 
38
 
 
39
#define SUFFIX "suffix"
 
40
#define FOLD "fold"
 
41
#define FOLDSUFFIX "foldsuffix"
 
42
#define MNULL 0
 
43
#define MSUFFIX 1
 
44
#define MFOLD 2
 
45
#define MFOLDSUFFIX 3
 
46
 
 
47
/*
 
48
 * The directories to search.  Assume that the manual directories are more
 
49
 * complete than the cat directories.
 
50
 */
 
51
 
 
52
#if ( defined(UTEK) || defined(apollo) || defined(Lynx) )
 
53
#  define SEARCHDIR  CAT
 
54
#else
 
55
#  define SEARCHDIR  MAN
 
56
#endif
 
57
 
 
58
#if ( defined(sgi) || (defined(i386) && (defined(SYSV) || defined(SVR4))) || (defined(BSD) && (BSD >= 199103)) || defined(linux) )
 
59
# define SEARCHOTHER CAT
 
60
#endif
 
61
 
 
62
/*
 
63
 * The default manual page directory.
 
64
 *
 
65
 * The MANPATH enviornment variable will override this.
 
66
 */
 
67
 
 
68
#ifndef SYSMANPATH
 
69
 
 
70
#if defined(macII)
 
71
#  define SYSMANPATH "/usr/catman/u_man:/usr/catman/a_man"
 
72
#elif defined(__bsdi__)
 
73
#  define SYSMANPATH "/usr/share/man:/usr/contrib/man:/usr/contrib/isode/man:/usr/local/man"
 
74
#elif defined(__OpenBSD__) || defined(__DARWIN__)
 
75
#  define SYSMANPATH "/usr/share/man:/usr/local/man:/usr/X11R6/man"
 
76
#elif defined(SVR4) || defined(__osf__) || (defined(BSD) && (BSD >= 199103))
 
77
#  define SYSMANPATH "/usr/share/man"
 
78
#elif defined(hcx)
 
79
#  define SYSMANPATH "/usr/catman/local_man:/usr/catman/u_man:/usr/catman/a_man:/usr/catman/p_man:/usr/catman/ada_man"
 
80
#elif defined(SYSV) && defined(i386) && !defined(SCO)
 
81
#  define SYSMANPATH "/usr/catman/u_man:/usr/catman/p_man"
 
82
#elif defined(sgi)
 
83
#  define SYSMANPATH "/usr/catman/a_man:/usr/catman/g_man:/usr/catman/p_man:/usr/catman/u_man:/usr/man/p_man:/usr/man/u_man:/usr/man"
 
84
#endif
 
85
 
 
86
#ifndef SYSMANPATH
 
87
#  define SYSMANPATH "/usr/man"
 
88
#endif
 
89
 
 
90
#endif
 
91
 
 
92
/*
 
93
 * Compression Definitions.
 
94
 */
 
95
 
 
96
#if defined( macII ) || defined( hcx ) || \
 
97
        (defined(SYSV) && defined(i386) && !defined(ISC) && !defined(SCO)) || \
 
98
        defined(sgi)
 
99
#  define COMPRESSION_EXTENSION   "z"
 
100
#  define UNCOMPRESS_FORMAT       "pcat %s > %s"
 
101
#  define NO_COMPRESS           /* mac can't handle using pack as a filter and
 
102
                                   xman needs it to be done that way. */
 
103
#elif defined(UTEK)
 
104
#  define COMPRESSION_EXTENSION "C"
 
105
#  define UNCOMPRESS_FORMAT     "ccat < %s > %s"
 
106
#  define COMPRESS              "compact"
 
107
#elif defined (ISC) || defined(SCO)
 
108
#  define COMPRESSION_EXTENSION   "Z"     /* dummy */
 
109
#  ifndef SCO
 
110
#    define COMPRESSION_EXTENSIONS  "zZF" /* pack, compress, freeze */
 
111
#  else
 
112
#    define COMPRESSION_EXTENSIONS  "zZ"  /* pack, compress */
 
113
#  endif
 
114
#  define UNCOMPRESS_FORMAT       uncompress_format
 
115
#  define UNCOMPRESS_FORMAT_1     "pcat %s > %s"
 
116
#  define UNCOMPRESS_FORMAT_2     "zcat < %s > %s"
 
117
#  define UNCOMPRESS_FORMAT_3     "fcat < %s > %s"
 
118
#  define NO_COMPRESS
 
119
#else
 
120
#  define COMPRESSION_EXTENSION "Z"
 
121
#  ifndef HAS_MKSTEMP
 
122
#    define UNCOMPRESS_FORMAT     "zcat < %s > %s"
 
123
#  else
 
124
#    define UNCOMPRESS_FORMAT     "zcat < %s >> %s"
 
125
#  endif
 
126
#  define COMPRESS              "compress"
 
127
#  define GZIP_EXTENSION "gz"
 
128
#  ifndef HAS_MKSTEMP
 
129
#    define GUNZIP_FORMAT "gzip -c -d < %s > %s"
 
130
#  else
 
131
#    define GUNZIP_FORMAT "gzip -c -d < %s >> %s"
 
132
#  endif
 
133
#  define GZIP_COMPRESS "gzip"
 
134
#endif
 
135
 
 
136
 
 
137
 
 
138
/*
 
139
 * The command filters for the manual and apropos searches.
 
140
 */
 
141
 
 
142
#if (defined(hpux) || defined(macII) || defined(CRAY) || defined(ultrix) || \
 
143
        defined(hcx) )
 
144
#  define NO_MANPATH_SUPPORT
 
145
#endif
 
146
 
 
147
#ifndef HAS_MKSTEMP
 
148
#  ifdef NO_MANPATH_SUPPORT
 
149
#    define APROPOS_FORMAT ("man -k %s | pr -h Apropos > %s")
 
150
#  else
 
151
#    define APROPOS_FORMAT ("man -M %s -k %s | pr -h Apropos > %s")
 
152
#  endif
 
153
#else
 
154
/* with mkstemp the temp output file is already created */
 
155
#  ifdef NO_MANPATH_SUPPORT
 
156
#    define APROPOS_FORMAT ("man -k %s | pr -h Apropos >> %s")
 
157
#  else
 
158
#    define APROPOS_FORMAT ("man -M %s -k %s | pr -h Apropos >> %s")
 
159
#  endif
 
160
#endif
 
161
 
 
162
#ifndef HANDLE_ROFFSEQ
 
163
# if defined(ultrix)
 
164
#  define FORMAT "| nroff -man"             /* The format command. */
 
165
# elif defined(CSRG_BASED)
 
166
#  define FORMAT "| eqn | tbl | nroff -mandoc"
 
167
# elif defined(BSD) && (BSD >= 199103)
 
168
#  define FORMAT "| eqn | tbl | nroff -man"
 
169
# elif defined(linux)
 
170
#  define FORMAT "| geqn | gtbl | groff -Tlatin1 -mandoc"
 
171
# else
 
172
#  define FORMAT "| neqn | nroff -man"      /* The format command. */
 
173
# endif
 
174
# if defined(linux)
 
175
#  define TBL "gtbl"
 
176
# else
 
177
#  define TBL "tbl"
 
178
# endif
 
179
#else /* HANDLE_ROFFSEQ */
 
180
# if defined(linux)
 
181
#  define ZSOELIM       "zsoelim"
 
182
#  define EQN           "geqn"
 
183
#  define TBL           "gtbl"
 
184
# else
 
185
#  define ZSOELIM       "soelim"
 
186
#  define EQN           "eqn"
 
187
#  define TBL           "tbl"
 
188
#endif
 
189
# define GRAP           "grap"
 
190
# define PIC            "pic"
 
191
# define VGRIND         "vgrind"
 
192
# define REFER          "refer"
 
193
# if defined(CSRG_BASED)
 
194
#  define FORMAT        "nroff -mandoc"
 
195
# elif defined(linux)
 
196
#  define FORMAT        "groff -Tlatin1 -mandoc"
 
197
# else
 
198
#  define FORMAT        "groff -man"
 
199
# endif
 
200
# define DEFAULT_MANROFFSEQ "et"
 
201
#endif /*HANDLE_ROFFSEQ */
 
202
 
 
203
/*
 
204
 * Names of the man and cat dirs.
 
205
 */
 
206
 
 
207
#ifdef __bsdi__
 
208
#define MAN "cat"
 
209
#else
 
210
#define MAN "man"
 
211
#endif
 
212
 
 
213
/*
 
214
 * The Apple, Cray,, SYSV386, and HCX folks put the preformatted pages in the
 
215
 * "man" directories.
 
216
 */
 
217
#if (defined(macII) || defined(CRAY) || defined(hcx) || \
 
218
        (defined(SYSV) && defined(i386))) && !defined(SCO)
 
219
#  define CAT MAN
 
220
#elif defined(SCO)
 
221
#  define CAT "cat."
 
222
#else
 
223
#  define CAT "cat"
 
224
#endif
 
225
 
 
226
typedef struct _SectionList {
 
227
  struct _SectionList * next;
 
228
  char * label;                 /* section label */
 
229
  char * directory;             /* section directory */
 
230
  int flags;
 
231
} SectionList;
 
232
 
 
233
extern char * CreateManpageName(char * entry, int section, int flags);
 
234
extern void AddStandardSections(SectionList **list, char * path);
 
235
extern void AddNewSection(SectionList **list, char * path, char * file, char * label, int flags);