[Samba] Loading shared RPC modules failed

Ralph Böhme slow at samba.org
Sat Aug 27 16:04:37 UTC 2016


On Fri, Aug 26, 2016 at 01:40:38PM -0400, Thomas Schulz wrote:
> > On Fri, Aug 26, 2016 at 12:19:30PM -0400, Thomas Schulz via samba wrote:
> > > I am testing Samba 4.5.0rc2 on a Solaris 10 i386 box. log.smbd contains
> > > a new message/error that does not show up on Samba 4.4.5. The error is:
> > > 
> > > [2016/08/26 11:45:54.886237,  0]
> > > 	../source3/rpc_server/rpc_service_setup.c:539(dcesrv_ep_setup)
> > >   dcesrv_ep_setup: Loading shared RPC modules failed
> > > 
> > > Dispite that, Samba 4.5.0rc2 seems to work correctly. Is this a problem
> > > or not?
> > 
> > nothing too bad, but please file a bugreport so I can track this. To
> > get rid of it you can
> > 
> > # smbd -b | grep MODULESDIR
> > 
> > # mkdir MODULESDIR/rpc
> > 
> > This should get rid of it.
> > 
> > Cheerio!
> > -slow
> 
> That fixes it. Bug 12184.

can you test attached patch? To test it, please rmdir MODULESDIR/rpc
again. Thanks!

Cheerio!
-slow
-------------- next part --------------
From f49de51fd277d0af88c0677387de03c2503a3661 Mon Sep 17 00:00:00 2001
From: Ralph Boehme <slow at samba.org>
Date: Sat, 27 Aug 2016 17:56:56 +0200
Subject: [PATCH] s3/rpc_server: shared rpc modules directory may not exist

A shared rpc modules directory may not exist if all RPC modules are built
static.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=12184

Signed-off-by: Ralph Boehme <slow at samba.org>
---
 source3/rpc_server/rpc_service_setup.c | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/source3/rpc_server/rpc_service_setup.c b/source3/rpc_server/rpc_service_setup.c
index e1625ee..263fcaf 100644
--- a/source3/rpc_server/rpc_service_setup.c
+++ b/source3/rpc_server/rpc_service_setup.c
@@ -536,7 +536,17 @@ bool dcesrv_ep_setup(struct tevent_context *ev_ctx,
 	/* Initialize shared modules */
 	mod_init_fns = load_samba_modules(tmp_ctx, "rpc");
 	if (mod_init_fns == NULL) {
-		DBG_ERR("Loading shared RPC modules failed\n");
+		if (errno != ENOENT) {
+			/*
+			 * ENOENT means the directory doesn't exist
+			 * which can happen if all modules are
+			 * static. So ENOENT is ok, everything else is
+			 * not ok.
+			 */
+			DBG_ERR("Loading shared RPC modules failed [%s]\n",
+				strerror(errno));
+			ok = false;
+		}
 		goto done;
 	}
 
-- 
2.7.4



More information about the samba mailing list