[SCM] Samba Shared Repository - branch master updated
Andreas Schneider
asn at samba.org
Thu Feb 27 10:48:04 MST 2014
The branch, master has been updated
via f0030c6 pidl: Make perl(Parse:Yapp:Driver) installation optional.
via 562ade6 s3-spoolssd: Don't register spoolssd if epmd is not running.
from 7d05baa ctdb-recoverd: Check if callback function is registered before calling
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit f0030c619bcf22dbe9eed54b2c0dc9c61f564838
Author: Andreas Schneider <asn at samba.org>
Date: Thu Feb 27 13:14:56 2014 +0100
pidl: Make perl(Parse:Yapp:Driver) installation optional.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=10472
Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Jelmer Vernooij <jelmer at samba.org>
Autobuild-User(master): Andreas Schneider <asn at cryptomilk.org>
Autobuild-Date(master): Thu Feb 27 18:47:03 CET 2014 on sn-devel-104
commit 562ade624a78a11a5af0f26b04df93d76d6166bd
Author: Andreas Schneider <asn at samba.org>
Date: Thu Feb 27 09:58:27 2014 +0100
s3-spoolssd: Don't register spoolssd if epmd is not running.
https://bugzilla.samba.org/show_bug.cgi?id=10474
Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Volker Lendecke <vl at samba.org>
-----------------------------------------------------------------------
Summary of changes:
pidl/lib/wscript_build | 6 +++++-
pidl/wscript | 25 ++++++++++++++++++++++++-
source3/printing/spoolssd.c | 39 ++++++++++++++++++++++-----------------
3 files changed, 51 insertions(+), 19 deletions(-)
Changeset truncated at 500 lines:
diff --git a/pidl/lib/wscript_build b/pidl/lib/wscript_build
index 29632d4..09d26eb 100644
--- a/pidl/lib/wscript_build
+++ b/pidl/lib/wscript_build
@@ -28,6 +28,10 @@ bld.INSTALL_FILES(bld.env.VENDORDIR_PERL,
Parse/Pidl/Samba3/ServerNDR.pm
Parse/Pidl/Compat.pm
Parse/Pidl/NDR.pm
- Parse/Yapp/Driver.pm
''',
flat=False)
+
+if not bld.CONFIG_SET('USING_SYSTEM_PARSE_YAPP_DRIVER'):
+ bld.INSTALL_FILES(bld.env.VENDORDIR_PERL,
+ 'Parse/Yapp/Driver.pm',
+ flat=False)
diff --git a/pidl/wscript b/pidl/wscript
index 77abb01..c7b72c4 100644
--- a/pidl/wscript
+++ b/pidl/wscript
@@ -1,6 +1,6 @@
#!/usr/bin/env python
-import os, sys, Logs
+import os, sys, Logs, Options
from samba_utils import MODE_755
def set_options(opt):
@@ -20,6 +20,9 @@ def configure(conf):
conf.find_program('yapp', var='YAPP')
conf.find_program('pod2man', var='POD2MAN')
+ # Check for perl(Parse::Yapp::Driver)
+ check_system_perl_module(conf, "Parse::Yapp::Driver", 1.05)
+
def build(bld):
bld.INSTALL_FILES('${BINDIR}', 'pidl', chmod=MODE_755)
@@ -82,3 +85,23 @@ try this to avoid this message:
$ touch ../pidl/lib/Parse/Pidl/IDL.pm ../pidl/lib/Parse/Pidl/Expr.pm
''')
+def check_system_perl_module(conf, module, version=None):
+ bundle_name = module.replace('::', '_')
+ module_check = module
+ found = False
+
+ # Create module string with version
+ if version:
+ module_check = module + ' ' + str(version)
+
+ # Check if we have to bundle it.
+ if conf.LIB_MUST_BE_BUNDLED(bundle_name.lower()):
+ return False
+
+ # Check for system perl module
+ if not conf.check_perl_module(module_check):
+ return False
+
+ conf.define('USING_SYSTEM_%s' % bundle_name.upper(), 1)
+
+ return True
diff --git a/source3/printing/spoolssd.c b/source3/printing/spoolssd.c
index 1bf87b3..f181fcc 100644
--- a/source3/printing/spoolssd.c
+++ b/source3/printing/spoolssd.c
@@ -33,6 +33,7 @@
#include "librpc/gen_ndr/srv_spoolss.h"
#include "rpc_server/rpc_server.h"
#include "rpc_server/rpc_ep_register.h"
+#include "rpc_server/rpc_config.h"
#include "rpc_server/spoolss/srv_spoolss_nt.h"
#include "librpc/rpc/dcerpc_ep.h"
#include "lib/server_prefork.h"
@@ -631,6 +632,7 @@ static char *get_bq_logfile(void)
pid_t start_spoolssd(struct tevent_context *ev_ctx,
struct messaging_context *msg_ctx)
{
+ enum rpc_service_mode_e epm_mode = rpc_epmapper_mode();
struct rpc_srv_callbacks spoolss_cb;
struct dcerpc_binding_vector *v;
TALLOC_CTX *mem_ctx;
@@ -778,25 +780,28 @@ pid_t start_spoolssd(struct tevent_context *ev_ctx,
exit(1);
}
- status = dcerpc_binding_vector_new(mem_ctx, &v);
- if (!NT_STATUS_IS_OK(status)) {
- DEBUG(0, ("Failed to create binding vector (%s)\n",
- nt_errstr(status)));
- exit(1);
- }
+ if (epm_mode != RPC_SERVICE_MODE_DISABLED &&
+ (lp_parm_bool(-1, "rpc_server", "register_embedded_np", false))) {
+ status = dcerpc_binding_vector_new(mem_ctx, &v);
+ if (!NT_STATUS_IS_OK(status)) {
+ DEBUG(0, ("Failed to create binding vector (%s)\n",
+ nt_errstr(status)));
+ exit(1);
+ }
- status = dcerpc_binding_vector_add_np_default(&ndr_table_spoolss, v);
- if (!NT_STATUS_IS_OK(status)) {
- DEBUG(0, ("Failed to add np to binding vector (%s)\n",
- nt_errstr(status)));
- exit(1);
- }
+ status = dcerpc_binding_vector_add_np_default(&ndr_table_spoolss, v);
+ if (!NT_STATUS_IS_OK(status)) {
+ DEBUG(0, ("Failed to add np to binding vector (%s)\n",
+ nt_errstr(status)));
+ exit(1);
+ }
- status = rpc_ep_register(ev_ctx, msg_ctx, &ndr_table_spoolss, v);
- if (!NT_STATUS_IS_OK(status)) {
- DEBUG(0, ("Failed to register spoolss endpoint! (%s)\n",
- nt_errstr(status)));
- exit(1);
+ status = rpc_ep_register(ev_ctx, msg_ctx, &ndr_table_spoolss, v);
+ if (!NT_STATUS_IS_OK(status)) {
+ DEBUG(0, ("Failed to register spoolss endpoint! (%s)\n",
+ nt_errstr(status)));
+ exit(1);
+ }
}
talloc_free(mem_ctx);
--
Samba Shared Repository
More information about the samba-cvs
mailing list