summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2011-12-15 11:51:20 +0100
committerStefan Metzmacher <metze@samba.org>2011-12-16 13:19:32 +0100
commit704cf106451466efe0b53254d152dad6fd8ac5ef (patch)
treedfc5343b172b1386acdf26bad10460dd9bf163da /source3
parentfe7c5198a25b7f4b65706d46e3c94cf982410edb (diff)
downloadsamba-704cf106451466efe0b53254d152dad6fd8ac5ef.tar.gz
samba-704cf106451466efe0b53254d152dad6fd8ac5ef.tar.bz2
samba-704cf106451466efe0b53254d152dad6fd8ac5ef.zip
s3:smbd: avoid using sconn_server_id()
metze
Diffstat (limited to 'source3')
-rw-r--r--source3/smbd/blocking.c14
-rw-r--r--source3/smbd/connection.c3
-rw-r--r--source3/smbd/negprot.c2
-rw-r--r--source3/smbd/open.c6
-rw-r--r--source3/smbd/server_exit.c3
-rw-r--r--source3/smbd/service.c3
-rw-r--r--source3/smbd/session.c3
-rw-r--r--source3/smbd/smb2_create.c3
-rw-r--r--source3/smbd/smb2_lock.c6
9 files changed, 24 insertions, 19 deletions
diff --git a/source3/smbd/blocking.c b/source3/smbd/blocking.c
index cd6967e344..028adce71c 100644
--- a/source3/smbd/blocking.c
+++ b/source3/smbd/blocking.c
@@ -225,7 +225,7 @@ bool push_blocking_lock_request( struct byte_range_lock *br_lck,
status = brl_lock(req->sconn->msg_ctx,
br_lck,
smblctx,
- sconn_server_id(req->sconn),
+ messaging_server_id(req->sconn->msg_ctx),
offset,
count,
lock_type == READ_LOCK ? PENDING_READ_LOCK : PENDING_WRITE_LOCK,
@@ -302,7 +302,7 @@ static void generic_blocking_lock_error(struct blocking_lock_record *blr, NTSTAT
fsp->last_lock_failure.context.smblctx = blr->smblctx;
fsp->last_lock_failure.context.tid = fsp->conn->cnum;
fsp->last_lock_failure.context.pid =
- sconn_server_id(fsp->conn->sconn);
+ messaging_server_id(fsp->conn->sconn->msg_ctx);
fsp->last_lock_failure.start = blr->offset;
fsp->last_lock_failure.size = blr->count;
fsp->last_lock_failure.fnum = fsp->fnum;
@@ -616,7 +616,7 @@ void smbd_cancel_pending_lock_requests_by_fid(files_struct *fsp,
brl_lock_cancel(br_lck,
blr->smblctx,
- sconn_server_id(sconn),
+ messaging_server_id(sconn->msg_ctx),
blr->offset,
blr->count,
blr->lock_flav,
@@ -659,7 +659,7 @@ void remove_pending_lock_requests_by_mid_smb1(
brl_lock_cancel(br_lck,
blr->smblctx,
- sconn_server_id(sconn),
+ messaging_server_id(sconn->msg_ctx),
blr->offset,
blr->count,
blr->lock_flav,
@@ -758,7 +758,7 @@ void process_blocking_lock_queue(struct smbd_server_connection *sconn)
if (br_lck) {
brl_lock_cancel(br_lck,
blr->smblctx,
- sconn_server_id(sconn),
+ messaging_server_id(sconn->msg_ctx),
blr->offset,
blr->count,
blr->lock_flav,
@@ -795,7 +795,7 @@ void process_blocking_lock_queue(struct smbd_server_connection *sconn)
brl_lock_cancel(br_lck,
blr->smblctx,
- sconn_server_id(sconn),
+ messaging_server_id(sconn->msg_ctx),
blr->offset,
blr->count,
blr->lock_flav,
@@ -908,7 +908,7 @@ struct blocking_lock_record *blocking_lock_cancel_smb1(files_struct *fsp,
memcpy(msg, &blr, sizeof(blr));
memcpy(&msg[sizeof(blr)], &err, sizeof(NTSTATUS));
- messaging_send_buf(sconn->msg_ctx, sconn_server_id(sconn),
+ messaging_send_buf(sconn->msg_ctx, messaging_server_id(sconn->msg_ctx),
MSG_SMB_BLOCKING_LOCK_CANCEL,
(uint8 *)&msg, sizeof(msg));
diff --git a/source3/smbd/connection.c b/source3/smbd/connection.c
index 5a9f4071b4..38615d5445 100644
--- a/source3/smbd/connection.c
+++ b/source3/smbd/connection.c
@@ -23,6 +23,7 @@
#include "dbwrap/dbwrap.h"
#include "auth.h"
#include "../lib/tsocket/tsocket.h"
+#include "messages.h"
/****************************************************************************
Delete a connection record.
@@ -167,7 +168,7 @@ bool claim_connection(connection_struct *conn, const char *name)
/* fill in the crec */
ZERO_STRUCT(crec);
crec.magic = 0x280267;
- crec.pid = sconn_server_id(conn->sconn);
+ crec.pid = messaging_server_id(conn->sconn->msg_ctx);
crec.cnum = conn->cnum;
crec.uid = conn->session_info->unix_token->uid;
crec.gid = conn->session_info->unix_token->gid;
diff --git a/source3/smbd/negprot.c b/source3/smbd/negprot.c
index 52ef96d5fc..0b5b810da9 100644
--- a/source3/smbd/negprot.c
+++ b/source3/smbd/negprot.c
@@ -720,7 +720,7 @@ void reply_negprot(struct smb_request *req)
when the client connects to port 445. Of course there is a small
window where we are listening to messages -- jerry */
- serverid_register(sconn_server_id(sconn),
+ serverid_register(messaging_server_id(sconn->msg_ctx),
FLAG_MSG_GENERAL|FLAG_MSG_SMBD
|FLAG_MSG_PRINT_GENERAL);
diff --git a/source3/smbd/open.c b/source3/smbd/open.c
index 8b7b47b7eb..86291ae714 100644
--- a/source3/smbd/open.c
+++ b/source3/smbd/open.c
@@ -1312,7 +1312,7 @@ static void defer_open(struct share_mode_lock *lck,
exit_server("push_deferred_open_message_smb failed");
}
add_deferred_open(lck, req->mid, request_time,
- sconn_server_id(req->sconn), state->id);
+ messaging_server_id(req->sconn->msg_ctx), state->id);
}
@@ -1727,7 +1727,7 @@ static NTSTATUS open_file_ntcreate(connection_struct *conn,
/* Remove the deferred open entry under lock. */
remove_deferred_open_entry(
state->id, req->mid,
- sconn_server_id(req->sconn));
+ messaging_server_id(req->sconn->msg_ctx));
/* Ensure we don't reprocess this message. */
remove_deferred_open_message_smb(req->sconn, req->mid);
@@ -2500,7 +2500,7 @@ static NTSTATUS open_file_ntcreate(connection_struct *conn,
* records. */
if (req != NULL) {
del_deferred_open_entry(lck, req->mid,
- sconn_server_id(req->sconn));
+ messaging_server_id(req->sconn->msg_ctx));
}
TALLOC_FREE(lck);
diff --git a/source3/smbd/server_exit.c b/source3/smbd/server_exit.c
index 05a4ece8e3..4e10a09a2b 100644
--- a/source3/smbd/server_exit.c
+++ b/source3/smbd/server_exit.c
@@ -43,6 +43,7 @@
#include "printing/notify.h"
#include "printing.h"
#include "serverid.h"
+#include "messages.h"
static struct files_struct *log_writeable_file_fn(
struct files_struct *fsp, void *private_data)
@@ -113,7 +114,7 @@ static void exit_server_common(enum server_exit_reason how,
/*
* For children the parent takes care of cleaning up
*/
- serverid_deregister(sconn_server_id(sconn));
+ serverid_deregister(messaging_server_id(sconn->msg_ctx));
}
#ifdef WITH_DFS
diff --git a/source3/smbd/service.c b/source3/smbd/service.c
index bd762c7425..6d6f9637ed 100644
--- a/source3/smbd/service.c
+++ b/source3/smbd/service.c
@@ -29,6 +29,7 @@
#include "passdb/lookup_sid.h"
#include "auth.h"
#include "lib/param/loadparm.h"
+#include "messages.h"
extern userdom_struct current_user_info;
@@ -716,7 +717,7 @@ connection_struct *make_connection_snum(struct smbd_server_connection *sconn,
if ((!conn->printer) && (!conn->ipc)) {
conn->notify_ctx = notify_init(conn,
- sconn_server_id(sconn),
+ messaging_server_id(sconn->msg_ctx),
sconn->msg_ctx,
sconn->ev_ctx,
conn);
diff --git a/source3/smbd/session.c b/source3/smbd/session.c
index 0797d1b41f..1d89122ddd 100644
--- a/source3/smbd/session.c
+++ b/source3/smbd/session.c
@@ -34,6 +34,7 @@
#include "auth.h"
#include "../lib/tsocket/tsocket.h"
#include "../libcli/security/security.h"
+#include "messages.h"
/********************************************************************
called when a session is created
@@ -41,7 +42,7 @@
bool session_claim(struct smbd_server_connection *sconn, user_struct *vuser)
{
- struct server_id pid = sconn_server_id(sconn);
+ struct server_id pid = messaging_server_id(sconn->msg_ctx);
TDB_DATA data;
int i = 0;
struct sessionid sessionid;
diff --git a/source3/smbd/smb2_create.c b/source3/smbd/smb2_create.c
index 302cfd7035..6218592e3e 100644
--- a/source3/smbd/smb2_create.c
+++ b/source3/smbd/smb2_create.c
@@ -26,6 +26,7 @@
#include "../libcli/smb/smb_common.h"
#include "../librpc/gen_ndr/ndr_security.h"
#include "../lib/util/tevent_ntstatus.h"
+#include "messages.h"
int map_smb2_oplock_levels_to_samba(uint8_t in_oplock_level)
{
@@ -1168,7 +1169,7 @@ static bool smbd_smb2_create_cancel(struct tevent_req *req)
mid = get_mid_from_smb2req(smb2req);
remove_deferred_open_entry(state->id, mid,
- sconn_server_id(smb2req->sconn));
+ messaging_server_id(smb2req->sconn->msg_ctx));
remove_deferred_open_message_smb2_internal(smb2req, mid);
smb2req->cancelled = true;
diff --git a/source3/smbd/smb2_lock.c b/source3/smbd/smb2_lock.c
index 10b35df4a6..fdca266a27 100644
--- a/source3/smbd/smb2_lock.c
+++ b/source3/smbd/smb2_lock.c
@@ -637,7 +637,7 @@ bool push_blocking_lock_request_smb2( struct byte_range_lock *br_lck,
status = brl_lock(sconn->msg_ctx,
br_lck,
smblctx,
- sconn_server_id(sconn),
+ messaging_server_id(sconn->msg_ctx),
offset,
count,
lock_type == READ_LOCK ? PENDING_READ_LOCK : PENDING_WRITE_LOCK,
@@ -689,7 +689,7 @@ static void remove_pending_lock(struct smbd_smb2_lock_state *state,
if (br_lck) {
brl_lock_cancel(br_lck,
blr->smblctx,
- sconn_server_id(blr->fsp->conn->sconn),
+ messaging_server_id(blr->fsp->conn->sconn->msg_ctx),
blr->offset,
blr->count,
blr->lock_flav,
@@ -909,7 +909,7 @@ void cancel_pending_lock_requests_by_fid_smb2(files_struct *fsp,
/* Remove the entries from the lock db. */
brl_lock_cancel(br_lck,
blr->smblctx,
- sconn_server_id(sconn),
+ messaging_server_id(sconn->msg_ctx),
blr->offset,
blr->count,
blr->lock_flav,