1/*	$NetBSD: overlays.c,v 1.3 2021/08/14 16:15:02 christos Exp $	*/
2
3/* overlays.c - Static overlay framework */
4/* $OpenLDAP$ */
5/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
6 *
7 * Copyright 2003-2021 The OpenLDAP Foundation.
8 * Copyright 2003 by Howard Chu.
9 * All rights reserved.
10 *
11 * Redistribution and use in source and binary forms, with or without
12 * modification, are permitted only as authorized by the OpenLDAP
13 * Public License.
14 *
15 * A copy of this license is available in the file LICENSE in the
16 * top-level directory of the distribution or, alternatively, at
17 * <http://www.OpenLDAP.org/license.html>.
18 */
19/* ACKNOWLEDGEMENTS:
20 * This work was initially developed by Howard Chu for inclusion in
21 * OpenLDAP Software.
22 */
23
24#include <sys/cdefs.h>
25__RCSID("$NetBSD: overlays.c,v 1.3 2021/08/14 16:15:02 christos Exp $");
26
27#include "portable.h"
28
29#include "slap.h"
30
31extern OverlayInit	slap_oinfo[];
32
33int
34overlay_init(void)
35{
36	int i, rc = 0;
37
38	for ( i= 0 ; slap_oinfo[i].ov_type; i++ ) {
39		rc = slap_oinfo[i].ov_init();
40		if ( rc ) {
41			Debug( LDAP_DEBUG_ANY,
42				"%s overlay setup failed, err %d\n",
43				slap_oinfo[i].ov_type, rc );
44			break;
45		}
46	}
47
48	return rc;
49}
50