diff options
author | Volker Lendecke <vl@samba.org> | 2008-04-23 11:35:51 +0200 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2008-04-23 11:35:51 +0200 |
commit | c02fd606e3623440d8720e627dd58dca75c0fa88 (patch) | |
tree | 831be5d29d6330cb62c7b19ce6cf78de2e3eb6d3 /source3 | |
parent | 82e36e083dd17a894e37645d03ba81fa1706ead3 (diff) | |
download | samba-c02fd606e3623440d8720e627dd58dca75c0fa88.tar.gz samba-c02fd606e3623440d8720e627dd58dca75c0fa88.tar.bz2 samba-c02fd606e3623440d8720e627dd58dca75c0fa88.zip |
Correctly initialize lp_load in smbstatus in the presence of registry on tdb2
(This used to be commit c4f7bee9238db536a7d5215cebb0bf37f757dfad)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/utils/status.c | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/source3/utils/status.c b/source3/utils/status.c index ffa3fbd17f..e4592dd850 100644 --- a/source3/utils/status.c +++ b/source3/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 */ |