1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-05 21:57:51 +03:00

initialise my name (used in %h) prior to loading smb.conf files.

(This used to be commit ed128c38a88746ec7822d598e72f0106a30a4af7)
This commit is contained in:
Luke Leighton 1999-02-03 17:10:44 +00:00
parent 91403ea47d
commit ceef08b60e

View File

@ -444,35 +444,14 @@ void exit_server(char *reason)
/**************************************************************************** /****************************************************************************
initialise connect, service and file structs initialise connect, service and file structs
****************************************************************************/ ****************************************************************************/
static void init_structs(void ) static void init_structs(void)
{ {
get_myname(myhostname,NULL); get_myname(myhostname,NULL);
/*
* Set the machine NETBIOS name if not already
* set from the config file.
*/
if (!*global_myname) {
char *p;
fstrcpy( global_myname, myhostname );
p = strchr( global_myname, '.' );
if (p)
*p = 0;
}
strupper( global_myname );
conn_init(); conn_init();
file_init(); file_init();
init_rpc_pipe_hnd(); /* for RPC pipes */
/* for RPC pipes */ init_lsa_policy_hnd(); /* for LSA handles */
init_rpc_pipe_hnd();
/* for LSA handles */
init_lsa_policy_hnd();
init_dptrs(); init_dptrs();
} }
@ -635,10 +614,20 @@ static void usage(char *pname)
exit(1); exit(1);
} }
init_structs();
if (!reload_services(False)) if (!reload_services(False))
return(-1); return(-1);
init_structs(); /*
* Set the machine NETBIOS name if not already
* set from the config file.
*/
if (!*global_myname)
{
fstrcpy(global_myname, dns_to_netbios_name(myhostname));
}
strupper(global_myname);
#ifdef WITH_SSL #ifdef WITH_SSL
{ {