summaryrefslogtreecommitdiffstats
path: root/src/util/mkmap_fail.c
blob: b2a22971a666978a36e718579882c680b8e6957b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
/*++
/* NAME
/*	mkmap_fail 3
/* SUMMARY
/*	create or open database, fail: style
/* SYNOPSIS
/*	#include <dict_fail.h>
/*
/*	MKMAP	*mkmap_fail_open(path)
/*	const char *path;
/*
/* DESCRIPTION
/*	This module implements support for error testing postmap
/*	and postalias with the fail: table type.
/* SEE ALSO
/*	dict_fail(3), fail dictionary interface.
/* LICENSE
/* .ad
/* .fi
/*	The Secure Mailer license must be distributed with this software.
/* AUTHOR(S)
/*	Wietse Venema
/*	IBM T.J. Watson Research
/*	P.O. Box 704
/*	Yorktown Heights, NY 10598, USA
/*
/*	Wietse Venema
/*	Google, Inc.
/*	111 8th Avenue
/*	New York, NY 10011, USA
/*--*/

/* System library. */

#include <sys_defs.h>

/* Utility library. */

#include <mymalloc.h>
#include <dict_fail.h>

 /*
  * Dummy module: the dict_fail module has all the functionality built-in.
  */
MKMAP  *mkmap_fail_open(const char *unused_path)
{
    MKMAP  *mkmap = (MKMAP *) mymalloc(sizeof(*mkmap));

    mkmap->open = dict_fail_open;
    mkmap->after_open = 0;
    mkmap->after_close = 0;
    return (mkmap);
}