2 Unix SMB/Netbios implementation.
4 Main SMB server routines
5 Copyright (C) Andrew Tridgell 1992-1998
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2 of the License, or
10 (at your option) any later version.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software
19 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
26 pstring servicesf = CONFIGFILE;
27 extern pstring debugf;
28 extern BOOL append_log;
29 extern int DEBUGLEVEL;
31 /*************************************************************************
32 initialise an msrpc service
33 *************************************************************************/
34 void msrpc_service_init(void)
36 if (!pwdb_initialise(True))
41 if(!initialise_sam_password_db())
46 if(!initialise_passgrp_db())
51 if(!initialise_group_db())
56 if(!initialise_alias_db())
61 if(!initialise_builtin_db())
66 if (!get_member_domain_sid())
68 DEBUG(0,("ERROR: Samba cannot obtain PDC SID from PDC(s) %s.\n",
69 lp_passwordserver()));
74 /****************************************************************************
75 reload the services file
76 **************************************************************************/
77 BOOL reload_services(BOOL test)
83 pstrcpy(fname,lp_configfile());
84 if (file_exist(fname,NULL) && !strcsequal(fname,servicesf)) {
85 pstrcpy(servicesf,fname);
92 if (test && !lp_file_list_changed())
97 ret = lp_load(servicesf,False,False,True);
99 /* perhaps the config filename is now set */
101 reload_services(True);
110 /****************************************************************************
112 ****************************************************************************/
113 int main(int argc,char *argv[])
115 #ifdef HAVE_SET_AUTH_PARAMETERS
116 set_auth_parameters(argc,argv);
120 /* needed for SecureWare on SCO */
128 setup_logging(argv[0],False);
129 fstrcpy(pipe_name, "NETLOGON");
130 slprintf(debugf, sizeof(debugf), "%s/log.%s", LOGFILEBASE, pipe_name);
131 add_msrpc_command_processor( pipe_name, argv[0], api_netlog_rpc );
133 return msrpc_main(argc, argv);