xref: /netbsd-src/external/ibm-public/postfix/dist/src/util/mkmap_fail.c (revision c48c605c14fd8622b523d1d6a3f0c0bad133ea89)
1*c48c605cSchristos /*	$NetBSD: mkmap_fail.c,v 1.2 2023/12/23 20:30:46 christos Exp $	*/
2059c16a8Schristos 
3059c16a8Schristos /*++
4059c16a8Schristos /* NAME
5059c16a8Schristos /*	mkmap_fail 3
6059c16a8Schristos /* SUMMARY
7059c16a8Schristos /*	create or open database, fail: style
8059c16a8Schristos /* SYNOPSIS
9059c16a8Schristos /*	#include <dict_fail.h>
10059c16a8Schristos /*
11059c16a8Schristos /*	MKMAP	*mkmap_fail_open(path)
12059c16a8Schristos /*	const char *path;
13059c16a8Schristos /*
14059c16a8Schristos /* DESCRIPTION
15059c16a8Schristos /*	This module implements support for error testing postmap
16059c16a8Schristos /*	and postalias with the fail: table type.
17059c16a8Schristos /* SEE ALSO
18059c16a8Schristos /*	dict_fail(3), fail dictionary interface.
19059c16a8Schristos /* LICENSE
20059c16a8Schristos /* .ad
21059c16a8Schristos /* .fi
22059c16a8Schristos /*	The Secure Mailer license must be distributed with this software.
23059c16a8Schristos /* AUTHOR(S)
24059c16a8Schristos /*	Wietse Venema
25059c16a8Schristos /*	IBM T.J. Watson Research
26059c16a8Schristos /*	P.O. Box 704
27059c16a8Schristos /*	Yorktown Heights, NY 10598, USA
28059c16a8Schristos /*
29059c16a8Schristos /*	Wietse Venema
30059c16a8Schristos /*	Google, Inc.
31059c16a8Schristos /*	111 8th Avenue
32059c16a8Schristos /*	New York, NY 10011, USA
33059c16a8Schristos /*--*/
34059c16a8Schristos 
35059c16a8Schristos /* System library. */
36059c16a8Schristos 
37059c16a8Schristos #include <sys_defs.h>
38059c16a8Schristos 
39059c16a8Schristos /* Utility library. */
40059c16a8Schristos 
41059c16a8Schristos #include <mymalloc.h>
42059c16a8Schristos #include <dict_fail.h>
43059c16a8Schristos 
44059c16a8Schristos  /*
45059c16a8Schristos   * Dummy module: the dict_fail module has all the functionality built-in.
46059c16a8Schristos   */
mkmap_fail_open(const char * unused_path)47059c16a8Schristos MKMAP  *mkmap_fail_open(const char *unused_path)
48059c16a8Schristos {
49059c16a8Schristos     MKMAP  *mkmap = (MKMAP *) mymalloc(sizeof(*mkmap));
50059c16a8Schristos 
51059c16a8Schristos     mkmap->open = dict_fail_open;
52059c16a8Schristos     mkmap->after_open = 0;
53059c16a8Schristos     mkmap->after_close = 0;
54059c16a8Schristos     return (mkmap);
55059c16a8Schristos }
56