summaryrefslogtreecommitdiff
path: root/source3/rpc_server
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2011-05-25 13:00:22 +1000
committerAndrew Bartlett <abartlet@samba.org>2011-05-31 00:32:07 +0200
commit8524924a460349a9aa56db475d771b8884fbe517 (patch)
treee96bf4378c676fdf8f4d2ba6f993aea9837e315e /source3/rpc_server
parentc981d4fa1269569a1c2db4bf72a67a357aacd69f (diff)
downloadsamba-8524924a460349a9aa56db475d771b8884fbe517.tar.gz
samba-8524924a460349a9aa56db475d771b8884fbe517.tar.bz2
samba-8524924a460349a9aa56db475d771b8884fbe517.zip
s3-smbd provide struct smbd_server_connection * to conn_snum_used
This provides the 'sconn' parameter to this key functions, that is currently duplicated in dummysmbd.c, which causes duplicate symbol issues in the waf build. This has natrually caused a number of consequential changes across the codebase, includning not passing a messaging context into initial reload_services(): This causes problems because the global smbd_server_connection isn't yet set up, as there isn't a connection here, just the initial process. Andrew Bartlett
Diffstat (limited to 'source3/rpc_server')
-rw-r--r--source3/rpc_server/dfs/srv_dfs_nt.c4
-rw-r--r--source3/rpc_server/spoolss/srv_spoolss_nt.c1
-rw-r--r--source3/rpc_server/srvsvc/srv_srvsvc_nt.c3
3 files changed, 6 insertions, 2 deletions
diff --git a/source3/rpc_server/dfs/srv_dfs_nt.c b/source3/rpc_server/dfs/srv_dfs_nt.c
index 324af534c9..6ca35a5dcc 100644
--- a/source3/rpc_server/dfs/srv_dfs_nt.c
+++ b/source3/rpc_server/dfs/srv_dfs_nt.c
@@ -26,6 +26,7 @@
#include "../librpc/gen_ndr/srv_dfs.h"
#include "msdfs.h"
#include "smbd/smbd.h"
+#include "smbd/globals.h"
#include "auth.h"
#undef DBGC_CLASS
@@ -278,7 +279,8 @@ WERROR _dfs_Enum(struct pipes_struct *p, struct dfs_Enum *r)
size_t i;
TALLOC_CTX *ctx = talloc_tos();
- jn = enum_msdfs_links(ctx, &num_jn);
+ jn = enum_msdfs_links(msg_ctx_to_sconn(p->msg_ctx),
+ ctx, &num_jn);
if (!jn || num_jn == 0) {
num_jn = 0;
jn = NULL;
diff --git a/source3/rpc_server/spoolss/srv_spoolss_nt.c b/source3/rpc_server/spoolss/srv_spoolss_nt.c
index fce4fd8648..f7fa189af5 100644
--- a/source3/rpc_server/spoolss/srv_spoolss_nt.c
+++ b/source3/rpc_server/spoolss/srv_spoolss_nt.c
@@ -47,6 +47,7 @@
#include "serverid.h"
#include "../libcli/registry/util_reg.h"
#include "smbd/smbd.h"
+#include "smbd/globals.h"
#include "auth.h"
#include "messages.h"
#include "rpc_server/spoolss/srv_spoolss_nt.h"
diff --git a/source3/rpc_server/srvsvc/srv_srvsvc_nt.c b/source3/rpc_server/srvsvc/srv_srvsvc_nt.c
index 472a31860e..7251d70dd9 100644
--- a/source3/rpc_server/srvsvc/srv_srvsvc_nt.c
+++ b/source3/rpc_server/srvsvc/srv_srvsvc_nt.c
@@ -33,6 +33,7 @@
#include "session.h"
#include "../lib/util/util_pw.h"
#include "smbd/smbd.h"
+#include "smbd/globals.h"
#include "auth.h"
#include "messages.h"
@@ -568,7 +569,7 @@ static WERROR init_srv_share_info_ctr(struct pipes_struct *p,
/* Ensure all the usershares are loaded. */
become_root();
- load_usershare_shares();
+ load_usershare_shares(msg_ctx_to_sconn(p->msg_ctx));
load_registry_shares();
num_services = lp_numservices();
unbecome_root();