~ubuntu-branches/ubuntu/hardy/openswan/hardy-updates

« back to all changes in this revision

Viewing changes to testing/lib/libpluto/spdbfirst.c

  • Committer: Bazaar Package Importer
  • Author(s): Rene Mayrhofer
  • Date: 2005-01-27 16:10:11 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20050127161011-idgybmyz3vwhpfiq
Tags: 2.3.0-2
Urgency HIGH due to security issue and problems with build-deps in sarge.
* Fix the security issue. Please see
  http://www.idefense.com/application/poi/display?id=190&
      type=vulnerabilities&flashstatus=false
  for more details. Thanks to Martin Schulze for informing me about
  this issue.
  Closes: #292458: Openswan XAUTH/PAM Buffer Overflow Vulnerability
* Added a Build-Dependency to lynx.
  Closes: #291143: openswan: FTBFS: Missing build dependency.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#define LEAK_DETECTIVE
 
2
#define AGGRESSIVE 1
 
3
#define XAUTH 1
 
4
#define PRINT_SA_DEBUG 1
 
5
#include "../../programs/pluto/spdb.c"
 
6
 
 
7
#define AD(x) x, elemsof(x)     /* Array Description */
 
8
#define AD_NULL NULL, 0
 
9
/*
 
10
 * empty structure, for clone use.
 
11
 */
 
12
static struct db_attr otempty[] = {
 
13
        { OAKLEY_ENCRYPTION_ALGORITHM, -1 },
 
14
        { OAKLEY_HASH_ALGORITHM,       -1 },
 
15
        { OAKLEY_AUTHENTICATION_METHOD, -1 },
 
16
        { OAKLEY_GROUP_DESCRIPTION,    -1 },
 
17
        };
 
18
 
 
19
static struct db_trans oakley_trans_empty[] = {
 
20
        { KEY_IKE, AD(otempty) },
 
21
    };
 
22
 
 
23
static struct db_prop oakley_pc_empty[] =
 
24
    { { PROTO_ISAKMP, AD(oakley_trans_empty) } };
 
25
 
 
26
static struct db_prop_conj oakley_props_empty[] = { { AD(oakley_pc_empty) } };
 
27
 
 
28
struct db_sa oakley_empty = { AD(oakley_props_empty) };
 
29
 
 
30
char *progname;
 
31
 
 
32
void exit_tool(int stat)
 
33
{
 
34
    exit(stat);
 
35
}
 
36
 
 
37
main(int argc, char *argv[])
 
38
{
 
39
    int i;
 
40
    struct db_sa *sa1 = NULL;
 
41
 
 
42
    progname = argv[0];
 
43
 
 
44
    tool_init_log();
 
45
    
 
46
    for(i=0; i < elemsof(oakley_sadb); i++) {
 
47
        /* make sure that leak reports and EFence reports get
 
48
         * placed in the right order.
 
49
         */
 
50
        fflush(stdout);
 
51
        fflush(stderr);
 
52
        printf("\nmain mode oakley: %u\n", i);
 
53
        sa_print(&oakley_sadb[i]);
 
54
        sa1 = sa_copy_sa_first(&oakley_sadb[i]);
 
55
 
 
56
        sa_print(sa1);
 
57
        
 
58
        free_sa(sa1);
 
59
 
 
60
        fflush(stdout);
 
61
        report_leaks();
 
62
    }
 
63
 
 
64
    tool_close_log();
 
65
    exit(0);
 
66
}
 
67
 
 
68
/*
 
69
 * Local Variables:
 
70
 * c-style: pluto
 
71
 * c-basic-offset: 4
 
72
 * End:
 
73
 */