[SCM] Samba Shared Repository - branch v3-2-stable updated -
release-3-2-0pre2-2016-g505d87a
Karolin Seeger
kseeger at samba.org
Thu Apr 24 07:48:37 GMT 2008
The branch, v3-2-stable has been updated
via 505d87ae7b4c8e906d4ce12da0ad754b46c9c17d (commit)
via 6934c699f31fa72e0eed0a60333c332e4d0780e1 (commit)
via 721c37e50905450f70e1c8320df10bfff3c81345 (commit)
from b5b72c3784d4de77f4cd221fc3f2ca99753b8b5b (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-stable
- Log -----------------------------------------------------------------
commit 505d87ae7b4c8e906d4ce12da0ad754b46c9c17d
Author: Volker Lendecke <vl at samba.org>
Date: Wed Apr 23 11:35:51 2008 +0200
Correctly initialize lp_load in smbstatus in the presence of registry on tdb2
(cherry picked from commit c4f7bee9238db536a7d5215cebb0bf37f757dfad)
commit 6934c699f31fa72e0eed0a60333c332e4d0780e1
Author: Volker Lendecke <vl at samba.org>
Date: Wed Apr 23 11:12:25 2008 +0200
Increase level of debug msg when a regkey is not found
This is a pretty normal situation if you have "include=registry" set but no
configuration options have been set there yet.
(cherry picked from commit 727127f1dcd49b31b5a48cc3f9314aa2380d60e1)
commit 721c37e50905450f70e1c8320df10bfff3c81345
Author: Volker Lendecke <vl at samba.org>
Date: Wed Apr 23 17:13:50 2008 +0200
Fix CLEAR_IF_FIRST handling of messages.tdb
We now open messages.tdb even before we do the become_daemon. become_daemon()
involves a fork and an immediate exit of the parent, thus the
parent_is_longlived argument must be set to false in this case. The parent is
not really long lived :-)
(cherry picked from commit 4f4781c6d17fe2db34dd5945fec52a7685448aec)
-----------------------------------------------------------------------
Summary of changes:
source/lib/smbconf/smbconf_reg.c | 2 +-
source/lib/util.c | 5 +++--
source/nmbd/asyncdns.c | 2 +-
source/nmbd/nmbd.c | 2 +-
source/printing/printing.c | 2 +-
source/smbd/server.c | 5 +++--
source/utils/status.c | 20 ++++++++++++++++----
source/winbindd/winbindd.c | 2 +-
source/winbindd/winbindd_cm.c | 2 +-
source/winbindd/winbindd_dual.c | 2 +-
10 files changed, 29 insertions(+), 15 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source/lib/smbconf/smbconf_reg.c b/source/lib/smbconf/smbconf_reg.c
index b6d6d70..dfce750 100644
--- a/source/lib/smbconf/smbconf_reg.c
+++ b/source/lib/smbconf/smbconf_reg.c
@@ -110,7 +110,7 @@ static WERROR smbconf_reg_open_path(TALLOC_CTX *mem_ctx,
key);
if (!W_ERROR_IS_OK(werr)) {
- DEBUG(1, ("Error opening registry path '%s': %s\n",
+ DEBUG(5, ("Error opening registry path '%s': %s\n",
path, dos_errstr(werr)));
}
diff --git a/source/lib/util.c b/source/lib/util.c
index db0da54..953981e 100644
--- a/source/lib/util.c
+++ b/source/lib/util.c
@@ -990,7 +990,8 @@ void become_daemon(bool Fork, bool no_process_group)
attach it to the logfile */
}
-bool reinit_after_fork(struct messaging_context *msg_ctx)
+bool reinit_after_fork(struct messaging_context *msg_ctx,
+ bool parent_longlived)
{
NTSTATUS status;
@@ -1001,7 +1002,7 @@ bool reinit_after_fork(struct messaging_context *msg_ctx)
set_need_random_reseed();
/* tdb needs special fork handling */
- if (tdb_reopen_all(1) == -1) {
+ if (tdb_reopen_all(parent_longlived ? 1 : 0) == -1) {
DEBUG(0,("tdb_reopen_all failed.\n"));
return false;
}
diff --git a/source/nmbd/asyncdns.c b/source/nmbd/asyncdns.c
index 0329491..ab9b1ed 100644
--- a/source/nmbd/asyncdns.c
+++ b/source/nmbd/asyncdns.c
@@ -164,7 +164,7 @@ void start_async_dns(void)
CatchSignal(SIGHUP, SIG_IGN);
CatchSignal(SIGTERM, SIGNAL_CAST sig_term );
- if (!reinit_after_fork(nmbd_messaging_context())) {
+ if (!reinit_after_fork(nmbd_messaging_context(), true)) {
DEBUG(0,("reinit_after_fork() failed\n"));
smb_panic("reinit_after_fork() failed");
}
diff --git a/source/nmbd/nmbd.c b/source/nmbd/nmbd.c
index 9396219..af4acc8 100644
--- a/source/nmbd/nmbd.c
+++ b/source/nmbd/nmbd.c
@@ -912,7 +912,7 @@ static bool open_sockets(bool isdaemon, int port)
pidfile_create("nmbd");
- if (!reinit_after_fork(nmbd_messaging_context())) {
+ if (!reinit_after_fork(nmbd_messaging_context(), false)) {
DEBUG(0,("reinit_after_fork() failed\n"));
exit(1);
}
diff --git a/source/printing/printing.c b/source/printing/printing.c
index fdf5e6c..c5fe53f 100644
--- a/source/printing/printing.c
+++ b/source/printing/printing.c
@@ -1406,7 +1406,7 @@ void start_background_queue(void)
/* Child. */
DEBUG(5,("start_background_queue: background LPQ thread started\n"));
- if (!reinit_after_fork(smbd_messaging_context())) {
+ if (!reinit_after_fork(smbd_messaging_context(), true)) {
DEBUG(0,("reinit_after_fork() failed\n"));
smb_panic("reinit_after_fork() failed");
}
diff --git a/source/smbd/server.c b/source/smbd/server.c
index 59bbfdb..cf02589 100644
--- a/source/smbd/server.c
+++ b/source/smbd/server.c
@@ -739,7 +739,8 @@ static bool open_sockets_smbd(bool is_daemon, bool interactive, const char *smb_
sizeof(remaddr)),
false);
- if (!reinit_after_fork(smbd_messaging_context())) {
+ if (!reinit_after_fork(
+ smbd_messaging_context(), true)) {
DEBUG(0,("reinit_after_fork() failed\n"));
smb_panic("reinit_after_fork() failed");
}
@@ -1285,7 +1286,7 @@ extern void build_options(bool screen);
if (is_daemon)
pidfile_create("smbd");
- if (!reinit_after_fork(smbd_messaging_context())) {
+ if (!reinit_after_fork(smbd_messaging_context(), false)) {
DEBUG(0,("reinit_after_fork() failed\n"));
exit(1);
}
diff --git a/source/utils/status.c b/source/utils/status.c
index ffa3fbd..e4592dd 100644
--- a/source/utils/status.c
+++ b/source/utils/status.c
@@ -296,6 +296,7 @@ static int traverse_sessionid(struct db_record *db, void *state)
};
TALLOC_CTX *frame = talloc_stackframe();
int ret = 0;
+ struct messaging_context *msg_ctx;
sec_init();
load_case_tables();
@@ -359,8 +360,9 @@ static int traverse_sessionid(struct db_record *db, void *state)
d_printf("using configfile = %s\n", get_dyn_CONFIGFILE());
}
- if (!lp_load(get_dyn_CONFIGFILE(),False,False,False,True)) {
- fprintf(stderr, "Can't load %s - run testparm to debug it\n", get_dyn_CONFIGFILE());
+ if (!lp_load_initial_only(get_dyn_CONFIGFILE())) {
+ fprintf(stderr, "Can't load %s - run testparm to debug it\n",
+ get_dyn_CONFIGFILE());
ret = -1;
goto done;
}
@@ -370,8 +372,18 @@ static int traverse_sessionid(struct db_record *db, void *state)
* the db_open() calls further down.
*/
- messaging_init(NULL, procid_self(), event_context_init(NULL));
-
+ msg_ctx = messaging_init(NULL, procid_self(),
+ event_context_init(NULL));
+
+ db_tdb2_setup_messaging(msg_ctx, true);
+
+ if (!lp_load(get_dyn_CONFIGFILE(),False,False,False,True)) {
+ fprintf(stderr, "Can't load %s - run testparm to debug it\n",
+ get_dyn_CONFIGFILE());
+ ret = -1;
+ goto done;
+ }
+
switch (profile_only) {
case 'P':
/* Dump profile data */
diff --git a/source/winbindd/winbindd.c b/source/winbindd/winbindd.c
index 64674b8..1072f8e 100644
--- a/source/winbindd/winbindd.c
+++ b/source/winbindd/winbindd.c
@@ -1189,7 +1189,7 @@ int main(int argc, char **argv, char **envp)
TimeInit();
- if (!reinit_after_fork(winbind_messaging_context())) {
+ if (!reinit_after_fork(winbind_messaging_context(), false)) {
DEBUG(0,("reinit_after_fork() failed\n"));
exit(1);
}
diff --git a/source/winbindd/winbindd_cm.c b/source/winbindd/winbindd_cm.c
index a65ba72..d9bbb79 100644
--- a/source/winbindd/winbindd_cm.c
+++ b/source/winbindd/winbindd_cm.c
@@ -199,7 +199,7 @@ static bool fork_child_dc_connect(struct winbindd_domain *domain)
/* Leave messages blocked - we will never process one. */
- if (!reinit_after_fork(winbind_messaging_context())) {
+ if (!reinit_after_fork(winbind_messaging_context(), true)) {
DEBUG(0,("reinit_after_fork() failed\n"));
_exit(0);
}
diff --git a/source/winbindd/winbindd_dual.c b/source/winbindd/winbindd_dual.c
index 77fbe3c..14ba38c 100644
--- a/source/winbindd/winbindd_dual.c
+++ b/source/winbindd/winbindd_dual.c
@@ -1005,7 +1005,7 @@ static bool fork_domain_child(struct winbindd_child *child)
state.sock = fdpair[0];
close(fdpair[1]);
- if (!reinit_after_fork(winbind_messaging_context())) {
+ if (!reinit_after_fork(winbind_messaging_context(), true)) {
DEBUG(0,("reinit_after_fork() failed\n"));
_exit(0);
}
--
Samba Shared Repository
More information about the samba-cvs
mailing list