xref: /netbsd-src/external/ibm-public/postfix/dist/src/util/mkmap_fail.c (revision c48c605c14fd8622b523d1d6a3f0c0bad133ea89)
1 /*	$NetBSD: mkmap_fail.c,v 1.2 2023/12/23 20:30:46 christos Exp $	*/
2 
3 /*++
4 /* NAME
5 /*	mkmap_fail 3
6 /* SUMMARY
7 /*	create or open database, fail: style
8 /* SYNOPSIS
9 /*	#include <dict_fail.h>
10 /*
11 /*	MKMAP	*mkmap_fail_open(path)
12 /*	const char *path;
13 /*
14 /* DESCRIPTION
15 /*	This module implements support for error testing postmap
16 /*	and postalias with the fail: table type.
17 /* SEE ALSO
18 /*	dict_fail(3), fail dictionary interface.
19 /* LICENSE
20 /* .ad
21 /* .fi
22 /*	The Secure Mailer license must be distributed with this software.
23 /* AUTHOR(S)
24 /*	Wietse Venema
25 /*	IBM T.J. Watson Research
26 /*	P.O. Box 704
27 /*	Yorktown Heights, NY 10598, USA
28 /*
29 /*	Wietse Venema
30 /*	Google, Inc.
31 /*	111 8th Avenue
32 /*	New York, NY 10011, USA
33 /*--*/
34 
35 /* System library. */
36 
37 #include <sys_defs.h>
38 
39 /* Utility library. */
40 
41 #include <mymalloc.h>
42 #include <dict_fail.h>
43 
44  /*
45   * Dummy module: the dict_fail module has all the functionality built-in.
46   */
mkmap_fail_open(const char * unused_path)47 MKMAP  *mkmap_fail_open(const char *unused_path)
48 {
49     MKMAP  *mkmap = (MKMAP *) mymalloc(sizeof(*mkmap));
50 
51     mkmap->open = dict_fail_open;
52     mkmap->after_open = 0;
53     mkmap->after_close = 0;
54     return (mkmap);
55 }
56