mirror of
https://github.com/samba-team/samba.git
synced 2025-03-01 04:58:35 +03:00
dbwrap: wait for tdb2 change notifies in smbd, nmbd and winbindd
metze (This used to be commit 64450cc1e441355aa8925b7183e90872eeab20b1)
This commit is contained in:
parent
138b58bcec
commit
e21b283d67
@ -711,7 +711,7 @@ NMBD_OBJ1 = nmbd/asyncdns.o nmbd/nmbd.o nmbd/nmbd_become_dmb.o \
|
||||
nmbd/nmbd_processlogon.o nmbd/nmbd_responserecordsdb.o \
|
||||
nmbd/nmbd_sendannounce.o nmbd/nmbd_serverlistdb.o \
|
||||
nmbd/nmbd_subnetdb.o nmbd/nmbd_winsproxy.o nmbd/nmbd_winsserver.o \
|
||||
nmbd/nmbd_workgroupdb.o nmbd/nmbd_synclists.o
|
||||
nmbd/nmbd_workgroupdb.o nmbd/nmbd_synclists.o smbd/connection.o
|
||||
|
||||
NMBD_OBJ = $(NMBD_OBJ1) $(PARAM_OBJ) $(LIBSMB_OBJ) $(KRBCLIENT_OBJ) \
|
||||
$(PROFILE_OBJ) $(LIB_NONSMBD_OBJ) $(POPT_LIB_OBJ)
|
||||
@ -1032,7 +1032,8 @@ WINBINDD_OBJ1 = \
|
||||
winbindd/winbindd_idmap.o \
|
||||
winbindd/winbindd_locator.o \
|
||||
winbindd/winbindd_ndr.o \
|
||||
auth/token_util.o
|
||||
auth/token_util.o \
|
||||
smbd/connection.o
|
||||
|
||||
WINBINDD_OBJ = \
|
||||
$(WINBINDD_OBJ1) $(PASSDB_OBJ) @LIBWBCLIENT_STATIC@ $(GROUPDB_OBJ) \
|
||||
|
@ -847,6 +847,8 @@ static bool open_sockets(bool isdaemon, int port)
|
||||
DEBUG(0,("nmbd version %s started.\n", SAMBA_VERSION_STRING));
|
||||
DEBUGADD(0,("%s\n", COPYRIGHT_STARTUP_MESSAGE));
|
||||
|
||||
db_tdb2_setup_messaging(NULL, false);
|
||||
|
||||
if ( !reload_nmbd_services(False) )
|
||||
return(-1);
|
||||
|
||||
@ -898,6 +900,10 @@ static bool open_sockets(bool isdaemon, int port)
|
||||
}
|
||||
|
||||
pidfile_create("nmbd");
|
||||
|
||||
/* get broadcast messages */
|
||||
claim_connection(NULL,"",FLAG_MSG_GENERAL|FLAG_MSG_DBWRAP);
|
||||
|
||||
messaging_register(nmbd_messaging_context(), NULL,
|
||||
MSG_FORCE_ELECTION, nmbd_message_election);
|
||||
#if 0
|
||||
@ -912,6 +918,8 @@ static bool open_sockets(bool isdaemon, int port)
|
||||
messaging_register(nmbd_messaging_context(), NULL,
|
||||
MSG_SEND_PACKET, msg_nmbd_send_packet);
|
||||
|
||||
db_tdb2_setup_messaging(nmbd_messaging_context(), true);
|
||||
|
||||
TimeInit();
|
||||
|
||||
DEBUG( 3, ( "Opening sockets %d\n", global_nmb_port ) );
|
||||
|
@ -553,7 +553,8 @@ static bool open_sockets_smbd(bool is_daemon, bool interactive, const char *smb_
|
||||
clustered mode, ctdb won't allow us to start doing database
|
||||
operations until it has gone thru a full startup, which
|
||||
includes checking to see that smbd is listening. */
|
||||
claim_connection(NULL,"",FLAG_MSG_GENERAL|FLAG_MSG_SMBD);
|
||||
claim_connection(NULL,"",
|
||||
FLAG_MSG_GENERAL|FLAG_MSG_SMBD|FLAG_MSG_DBWRAP);
|
||||
|
||||
/* Listen to messages */
|
||||
|
||||
@ -574,6 +575,8 @@ static bool open_sockets_smbd(bool is_daemon, bool interactive, const char *smb_
|
||||
MSG_SMB_INJECT_FAULT, msg_inject_fault);
|
||||
#endif
|
||||
|
||||
db_tdb2_setup_messaging(smbd_messaging_context(), true);
|
||||
|
||||
/* now accept incoming connections - forking a new process
|
||||
for each incoming connection */
|
||||
DEBUG(2,("waiting for a connection\n"));
|
||||
@ -1226,6 +1229,7 @@ extern void build_options(bool screen);
|
||||
/*
|
||||
* Do this before reload_services.
|
||||
*/
|
||||
db_tdb2_setup_messaging(NULL, false);
|
||||
|
||||
if (!reload_services(False))
|
||||
return(-1);
|
||||
|
@ -1102,6 +1102,8 @@ int main(int argc, char **argv, char **envp)
|
||||
DEBUG(0,("winbindd version %s started.\n", SAMBA_VERSION_STRING));
|
||||
DEBUGADD(0,("%s\n", COPYRIGHT_STARTUP_MESSAGE));
|
||||
|
||||
db_tdb2_setup_messaging(NULL, false);
|
||||
|
||||
if (!reload_services_file()) {
|
||||
DEBUG(0, ("error opening config file\n"));
|
||||
exit(1);
|
||||
@ -1188,6 +1190,9 @@ int main(int argc, char **argv, char **envp)
|
||||
exit(1);
|
||||
}
|
||||
|
||||
/* get broadcast messages */
|
||||
claim_connection(NULL,"",FLAG_MSG_GENERAL|FLAG_MSG_DBWRAP);
|
||||
|
||||
/* React on 'smbcontrol winbindd reload-config' in the same way
|
||||
as to SIGHUP signal */
|
||||
messaging_register(winbind_messaging_context(), NULL,
|
||||
@ -1214,6 +1219,8 @@ int main(int argc, char **argv, char **envp)
|
||||
MSG_WINBIND_DUMP_DOMAIN_LIST,
|
||||
winbind_msg_dump_domain_list);
|
||||
|
||||
db_tdb2_setup_messaging(winbind_messaging_context(), true);
|
||||
|
||||
netsamlogon_cache_init(); /* Non-critical */
|
||||
|
||||
/* clear the cached list of trusted domains */
|
||||
|
Loading…
x
Reference in New Issue
Block a user