From 3f3568085dbdc4a5bc45610c38ca2560f9d5afe4 Mon Sep 17 00:00:00 2001 From: Ralph Boehme 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 Reviewed-by: Jeremy Allison (cherry picked from commit 58889e04bd545d7420d1193e134351bd0ccb8430) --- 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