xref: /onnv-gate/usr/src/lib/smbsrv/libmlsvc/common/mlsvc_init.c (revision 5331:3047ad28a67b)
1*5331Samw /*
2*5331Samw  * CDDL HEADER START
3*5331Samw  *
4*5331Samw  * The contents of this file are subject to the terms of the
5*5331Samw  * Common Development and Distribution License (the "License").
6*5331Samw  * You may not use this file except in compliance with the License.
7*5331Samw  *
8*5331Samw  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9*5331Samw  * or http://www.opensolaris.org/os/licensing.
10*5331Samw  * See the License for the specific language governing permissions
11*5331Samw  * and limitations under the License.
12*5331Samw  *
13*5331Samw  * When distributing Covered Code, include this CDDL HEADER in each
14*5331Samw  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15*5331Samw  * If applicable, add the following below this CDDL HEADER, with the
16*5331Samw  * fields enclosed by brackets "[]" replaced with your own identifying
17*5331Samw  * information: Portions Copyright [yyyy] [name of copyright owner]
18*5331Samw  *
19*5331Samw  * CDDL HEADER END
20*5331Samw  */
21*5331Samw /*
22*5331Samw  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
23*5331Samw  * Use is subject to license terms.
24*5331Samw  */
25*5331Samw 
26*5331Samw #pragma ident	"%Z%%M%	%I%	%E% SMI"
27*5331Samw 
28*5331Samw #include <stdio.h>
29*5331Samw #include <unistd.h>
30*5331Samw 
31*5331Samw #include <smbsrv/libsmb.h>
32*5331Samw #include <smbsrv/libmlsvc.h>
33*5331Samw #include <smbsrv/mlsvc_util.h>
34*5331Samw #include <smbsrv/lsalib.h>
35*5331Samw 
36*5331Samw void dssetup_initialize(void);
37*5331Samw void srvsvc_initialize(void);
38*5331Samw void wkssvc_initialize(void);
39*5331Samw void lsarpc_initialize(void);
40*5331Samw void logr_initialize(void);
41*5331Samw void netr_initialize(void);
42*5331Samw void samr_initialize(void);
43*5331Samw void svcctl_initialize(void);
44*5331Samw void winreg_initialize(void);
45*5331Samw 
46*5331Samw /*
47*5331Samw  * All mlrpc initialization is invoked from here.
48*5331Samw  * Returns 0 upon success.  Otherwise, returns -1.
49*5331Samw  */
50*5331Samw int
51*5331Samw mlsvc_init(void)
52*5331Samw {
53*5331Samw 	srvsvc_initialize();
54*5331Samw 	wkssvc_initialize();
55*5331Samw 	lsarpc_initialize();
56*5331Samw 	netr_initialize();
57*5331Samw 	dssetup_initialize();
58*5331Samw 	samr_initialize();
59*5331Samw 	svcctl_initialize();
60*5331Samw 	winreg_initialize();
61*5331Samw 	logr_initialize();
62*5331Samw 
63*5331Samw 	(void) sam_init();
64*5331Samw 	return (0);
65*5331Samw }
66