~ubuntu-branches/ubuntu/maverick/krb5/maverick

« back to all changes in this revision

Viewing changes to src/include/kerberosIV/kparse.h

  • Committer: Bazaar Package Importer
  • Author(s): Sam Hartman
  • Date: 2009-05-07 16:16:34 UTC
  • mfrom: (13.1.7 sid)
  • Revision ID: james.westby@ubuntu.com-20090507161634-xqyk0s9na0le4flj
Tags: 1.7dfsg~beta1-4
When  decrypting the TGS response fails with the subkey, try with the
session key to work around Heimdal bug, Closes: #527353 

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
 * include/kerberosIV/kparse.h
3
 
 *
4
 
 * Copyright 1988, 1994 by the Massachusetts Institute of Technology.
5
 
 * All Rights Reserved.
6
 
 *
7
 
 * Export of this software from the United States of America may
8
 
 *   require a specific license from the United States Government.
9
 
 *   It is the responsibility of any person or organization contemplating
10
 
 *   export to obtain such a license before exporting.
11
 
 * 
12
 
 * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
13
 
 * distribute this software and its documentation for any purpose and
14
 
 * without fee is hereby granted, provided that the above copyright
15
 
 * notice appear in all copies and that both that copyright notice and
16
 
 * this permission notice appear in supporting documentation, and that
17
 
 * the name of M.I.T. not be used in advertising or publicity pertaining
18
 
 * to distribution of the software without specific, written prior
19
 
 * permission.  Furthermore if you modify this software you must label
20
 
 * your software as modified software and not distribute it in such a
21
 
 * fashion that it might be confused with the original M.I.T. software.
22
 
 * M.I.T. makes no representations about the suitability of
23
 
 * this software for any purpose.  It is provided "as is" without express
24
 
 * or implied warranty.
25
 
 * 
26
 
 * Include file for kparse routines.
27
 
 */
28
 
 
29
 
#ifndef KPARSE_DEFS
30
 
#define KPARSE_DEFS
31
 
 
32
 
/*
33
 
 * values returned by fGetParameterSet() 
34
 
 */
35
 
 
36
 
#define PS_BAD_KEYWORD    -2    /* unknown or duplicate keyword */
37
 
#define PS_SYNTAX         -1    /* syntax error */
38
 
#define PS_OKAY            0    /* got a complete parameter set */
39
 
#define PS_EOF             1    /* nothing more in the file */
40
 
 
41
 
/*
42
 
 * values returned by fGetKeywordValue() 
43
 
 */
44
 
 
45
 
#define KV_SYNTAX        -2     /* syntax error */
46
 
#define KV_EOF           -1     /* nothing more in the file */
47
 
#define KV_OKAY           0     /* got a keyword/value pair */
48
 
#define KV_EOL            1     /* nothing more on this line */
49
 
 
50
 
/*
51
 
 * values returned by fGetToken() 
52
 
 */
53
 
 
54
 
#define GTOK_BAD_QSTRING -1     /* newline found in quoted string */
55
 
#define GTOK_EOF          0     /* end of file encountered */
56
 
#define GTOK_QSTRING      1     /* quoted string */
57
 
#define GTOK_STRING       2     /* unquoted string */
58
 
#define GTOK_NUMBER       3     /* one or more digits */
59
 
#define GTOK_PUNK         4     /* punks are punctuation, newline,
60
 
                                 * etc. */
61
 
#define GTOK_WHITE        5     /* one or more whitespace chars */
62
 
 
63
 
/*
64
 
 * extended character classification macros 
65
 
 */
66
 
 
67
 
#define ISOCTAL(CH)     ( (CH>='0')  && (CH<='7') )
68
 
#define ISQUOTE(CH)     ( (CH=='\"') || (CH=='\'') || (CH=='`') )
69
 
#define ISWHITESPACE(C) ( (C==' ')   || (C=='\t') )
70
 
#define ISLINEFEED(C)   ( (C=='\n')  || (C=='\r')  || (C=='\f') )
71
 
 
72
 
/*
73
 
 * tokens consist of any printable charcacter except comma, equal, or
74
 
 * whitespace 
75
 
 */
76
 
 
77
 
#define ISTOKENCHAR(C) ((C>040) && (C<0177) && (C != ',') && (C != '='))
78
 
 
79
 
/*
80
 
 * the parameter table defines the keywords that will be recognized by
81
 
 * fGetParameterSet, and their default values if not specified. 
82
 
 */
83
 
 
84
 
typedef struct {
85
 
    char *keyword;
86
 
    char *defvalue;
87
 
    char *value;
88
 
}       parmtable;
89
 
 
90
 
#define PARMCOUNT(P) (sizeof(P)/sizeof(P[0]))
91
 
 
92
 
int fGetChar (FILE *fp);
93
 
int fGetParameterSet (FILE *fp, parmtable parm[], int parmcount);
94
 
int ParmCompare (parmtable parm[], int parmcount, char *keyword, char *value);
95
 
 
96
 
void FreeParameterSet (parmtable parm[], int parmcount);
97
 
 
98
 
int fGetKeywordValue (FILE *fp, char *keyword, int klen, char *value, int vlen);
99
 
 
100
 
int fGetToken (FILE *fp, char *dest, int maxlen);
101
 
 
102
 
int fGetLiteral (FILE *fp);
103
 
 
104
 
int fUngetChar (int ch, FILE *fp);
105
 
 
106
 
#endif /* KPARSE_DEFS */