[SCM] Samba Shared Repository - branch master updated
Noel Power
npower at samba.org
Fri Feb 1 18:26:01 UTC 2019
The branch, master has been updated
via 6a77237c50d printing: check lp_load_printers() prior to pcap cache update
via 0ae7c3144a3 printing: drop pcap_cache_loaded() guard around load_printers()
via bdb90ec974b build: replace SAMBA3_ADD_OPTION with samba_add_onoff_option
from 545c3e6b124 ldb: Release ldb 1.6.0
https://git.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 6a77237c50dd258521f356af0b5dc9942dd5592e
Author: David Disseldorp <ddiss at samba.org>
Date: Tue Jan 29 01:55:04 2019 +0100
printing: check lp_load_printers() prior to pcap cache update
Avoid explicit and housekeeping timer triggered printcap cache updates
if lp_load_printers() is disabled.
Bug: https://bugzilla.samba.org/show_bug.cgi?id=13766
Signed-off-by: David Disseldorp <ddiss at samba.org>
Autobuild-User(master): Noel Power <npower at samba.org>
Autobuild-Date(master): Fri Feb 1 19:25:03 CET 2019 on sn-devel-144
commit 0ae7c3144a30910adb1e54cf46d54d42a1036839
Author: David Disseldorp <ddiss at samba.org>
Date: Tue Jan 29 01:50:15 2019 +0100
printing: drop pcap_cache_loaded() guard around load_printers()
Add the pcap_cache_loaded() check to load_printers() and return early
if it returns false. This simplifies callers in preparation for checking
lp_load_printers() in the printcap cache update code-path.
Bug: https://bugzilla.samba.org/show_bug.cgi?id=13766
Signed-off-by: David Disseldorp <ddiss at samba.org>
Reviewed-by: Noel Power <npower at samba.org>
commit bdb90ec974b31a6430a2f2329364b01d6f7270c6
Author: David Disseldorp via samba-technical <samba-technical at lists.samba.org>
Date: Wed Jan 30 17:13:47 2019 +0100
build: replace SAMBA3_ADD_OPTION with samba_add_onoff_option
The former is just an alias for the latter. samba_add_onoff_option()
better describes what the function actually does, so use that and
remove the alias.
Signed-off-by: David Disseldorp <ddiss at samba.org>
Reviewed-by: Noel Power <npower at samba.org>
-----------------------------------------------------------------------
Summary of changes:
buildtools/wafsamba/samba3.py | 4 +--
source3/printing/load.c | 4 ++-
source3/printing/pcap.c | 5 +++
source3/printing/queue_process.c | 6 ++--
source3/printing/spoolssd.c | 8 ++---
source3/wscript | 56 +++++++++++++++++-----------------
source4/dsdb/samdb/ldb_modules/wscript | 2 +-
7 files changed, 42 insertions(+), 43 deletions(-)
Changeset truncated at 500 lines:
diff --git a/buildtools/wafsamba/samba3.py b/buildtools/wafsamba/samba3.py
index 5375679c88f..5aab2509b24 100644
--- a/buildtools/wafsamba/samba3.py
+++ b/buildtools/wafsamba/samba3.py
@@ -2,12 +2,10 @@
# and for SAMBA_ macros for building libraries, binaries etc
import os
-from waflib import Options, Build
+from waflib import Build
from samba_utils import os_path_relpath, TO_LIST
from samba_autoconf import library_flags
-Options.OptionsContext.SAMBA3_ADD_OPTION = Options.OptionsContext.samba_add_onoff_option
-
def SAMBA3_IS_STATIC_MODULE(bld, module):
'''Check whether module is in static list'''
if module in bld.env['static_modules']:
diff --git a/source3/printing/load.c b/source3/printing/load.c
index 51495f970db..7e25d5a91c7 100644
--- a/source3/printing/load.c
+++ b/source3/printing/load.c
@@ -64,7 +64,9 @@ load automatic printer services from pre-populated pcap cache
***************************************************************************/
void load_printers(void)
{
- SMB_ASSERT(pcap_cache_loaded(NULL));
+ if (!pcap_cache_loaded(NULL)) {
+ return;
+ }
add_auto_printers();
diff --git a/source3/printing/pcap.c b/source3/printing/pcap.c
index 726111816d6..d771cd9dfeb 100644
--- a/source3/printing/pcap.c
+++ b/source3/printing/pcap.c
@@ -139,6 +139,11 @@ void pcap_cache_reload(struct tevent_context *ev,
DEBUG(3, ("reloading printcap cache\n"));
+ if (!lp_load_printers()) {
+ DBG_NOTICE("skipping reload - load printers disabled\n");
+ return;
+ }
+
/* only go looking if no printcap name supplied */
if (pcap_name == NULL || *pcap_name == 0) {
DEBUG(0, ("No printcap file name configured!\n"));
diff --git a/source3/printing/queue_process.c b/source3/printing/queue_process.c
index 1d60f259a86..7ac609a318a 100644
--- a/source3/printing/queue_process.c
+++ b/source3/printing/queue_process.c
@@ -172,7 +172,7 @@ static bool printing_subsystem_queue_tasks(struct bq_state *state)
/* cancel any existing housekeeping event */
TALLOC_FREE(state->housekeep);
- if (housekeeping_period == 0) {
+ if ((housekeeping_period == 0) || !lp_load_printers()) {
DEBUG(4, ("background print queue housekeeping disabled\n"));
return true;
}
@@ -483,9 +483,7 @@ void printing_subsystem_update(struct tevent_context *ev_ctx,
bool force)
{
if (background_lpq_updater_pid != -1) {
- if (pcap_cache_loaded(NULL)) {
- load_printers();
- }
+ load_printers();
if (force) {
/* Send a sighup to the background process.
* this will force it to reload printers */
diff --git a/source3/printing/spoolssd.c b/source3/printing/spoolssd.c
index c029f1a11d5..1809679ebca 100644
--- a/source3/printing/spoolssd.c
+++ b/source3/printing/spoolssd.c
@@ -288,9 +288,7 @@ static bool spoolss_child_init(struct tevent_context *ev_ctx,
* If so then we probably missed a message and should load_printers()
* ourselves. If pcap has not been loaded yet, then ignore, we will get
* a message as soon as the bq process completes the reload. */
- if (pcap_cache_loaded(NULL)) {
- load_printers();
- }
+ load_printers();
/* try to reinit rpc queues */
spoolss_cb.init = spoolss_init_cb;
@@ -699,9 +697,7 @@ pid_t start_spoolssd(struct tevent_context *ev_ctx,
* If pcap has not been loaded yet, then ignore, as we will reload on
* client enumeration anyway.
*/
- if (pcap_cache_loaded(NULL)) {
- load_printers();
- }
+ load_printers();
mem_ctx = talloc_new(NULL);
if (mem_ctx == NULL) {
diff --git a/source3/wscript b/source3/wscript
index d2916593888..8086359f706 100644
--- a/source3/wscript
+++ b/source3/wscript
@@ -40,45 +40,45 @@ def options(opt):
"--with-shared-modules"),
action="store", dest='shared_modules', default=None)
- opt.SAMBA3_ADD_OPTION('winbind')
- opt.SAMBA3_ADD_OPTION('ads')
- opt.SAMBA3_ADD_OPTION('ldap')
- opt.SAMBA3_ADD_OPTION('cups', with_name="enable", without_name="disable")
- opt.SAMBA3_ADD_OPTION('iprint', with_name="enable", without_name="disable")
- opt.SAMBA3_ADD_OPTION('pam')
- opt.SAMBA3_ADD_OPTION('quotas')
- opt.SAMBA3_ADD_OPTION('sendfile-support', default=None)
- opt.SAMBA3_ADD_OPTION('utmp')
- opt.SAMBA3_ADD_OPTION('avahi', with_name="enable", without_name="disable")
- opt.SAMBA3_ADD_OPTION('iconv')
- opt.SAMBA3_ADD_OPTION('acl-support')
- opt.SAMBA3_ADD_OPTION('dnsupdate')
- opt.SAMBA3_ADD_OPTION('syslog')
- opt.SAMBA3_ADD_OPTION('automount')
- opt.SAMBA3_ADD_OPTION('dmapi', default=None) # None means autodetection
- opt.SAMBA3_ADD_OPTION('fam', default=None) # None means autodetection
- opt.SAMBA3_ADD_OPTION('profiling-data', default=False)
- opt.SAMBA3_ADD_OPTION('libarchive', default=True)
-
- opt.SAMBA3_ADD_OPTION('cluster-support', default=False)
-
- opt.SAMBA3_ADD_OPTION('regedit', default=None)
-
- opt.SAMBA3_ADD_OPTION('fake-kaserver',
+ opt.samba_add_onoff_option('winbind')
+ opt.samba_add_onoff_option('ads')
+ opt.samba_add_onoff_option('ldap')
+ opt.samba_add_onoff_option('cups', with_name="enable", without_name="disable")
+ opt.samba_add_onoff_option('iprint', with_name="enable", without_name="disable")
+ opt.samba_add_onoff_option('pam')
+ opt.samba_add_onoff_option('quotas')
+ opt.samba_add_onoff_option('sendfile-support', default=None)
+ opt.samba_add_onoff_option('utmp')
+ opt.samba_add_onoff_option('avahi', with_name="enable", without_name="disable")
+ opt.samba_add_onoff_option('iconv')
+ opt.samba_add_onoff_option('acl-support')
+ opt.samba_add_onoff_option('dnsupdate')
+ opt.samba_add_onoff_option('syslog')
+ opt.samba_add_onoff_option('automount')
+ opt.samba_add_onoff_option('dmapi', default=None) # None means autodetection
+ opt.samba_add_onoff_option('fam', default=None) # None means autodetection
+ opt.samba_add_onoff_option('profiling-data', default=False)
+ opt.samba_add_onoff_option('libarchive', default=True)
+
+ opt.samba_add_onoff_option('cluster-support', default=False)
+
+ opt.samba_add_onoff_option('regedit', default=None)
+
+ opt.samba_add_onoff_option('fake-kaserver',
help=("Include AFS fake-kaserver support"), default=False)
opt.add_option('--with-libcephfs',
help=("Directory under which libcephfs is installed"),
action="store", dest='libcephfs_dir', default=None)
- opt.SAMBA3_ADD_OPTION('glusterfs', with_name="enable", without_name="disable", default=True)
- opt.SAMBA3_ADD_OPTION('cephfs', with_name="enable", without_name="disable", default=True)
+ opt.samba_add_onoff_option('glusterfs', with_name="enable", without_name="disable", default=True)
+ opt.samba_add_onoff_option('cephfs', with_name="enable", without_name="disable", default=True)
opt.add_option('--enable-vxfs',
help=("enable support for VxFS (default=no)"),
action="store_true", dest='enable_vxfs', default=False)
- opt.SAMBA3_ADD_OPTION('spotlight', with_name="enable", without_name="disable", default=False)
+ opt.samba_add_onoff_option('spotlight', with_name="enable", without_name="disable", default=False)
def configure(conf):
default_static_modules = []
diff --git a/source4/dsdb/samdb/ldb_modules/wscript b/source4/dsdb/samdb/ldb_modules/wscript
index 52dd9c111fa..ef984ccbe34 100644
--- a/source4/dsdb/samdb/ldb_modules/wscript
+++ b/source4/dsdb/samdb/ldb_modules/wscript
@@ -8,7 +8,7 @@ def options(opt):
help += "This requires gpgme devel and python packages "
help += "(e.g. libgpgme11-dev, python-gpgme on debian/ubuntu)."
- opt.SAMBA3_ADD_OPTION('gpgme', default=True, help=(help))
+ opt.samba_add_onoff_option('gpgme', default=True, help=(help))
return
--
Samba Shared Repository
More information about the samba-cvs
mailing list