summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2012-06-02 13:40:26 +0200
committerStefan Metzmacher <metze@samba.org>2012-06-03 17:23:27 +0200
commit85e6dcf49c24510ac9c31d56e8d7d1873d9cc638 (patch)
treecbf99e6e58bb975ec9393540abbf9f542bc42854 /source3/smbd
parent9dba59d0269f617af02bdc681261436a96ec34d1 (diff)
downloadsamba-85e6dcf49c24510ac9c31d56e8d7d1873d9cc638.tar.gz
samba-85e6dcf49c24510ac9c31d56e8d7d1873d9cc638.tar.bz2
samba-85e6dcf49c24510ac9c31d56e8d7d1873d9cc638.zip
s3:smbd/open: avoid procid_is_me()
metze
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/open.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/source3/smbd/open.c b/source3/smbd/open.c
index 9042e90a84..17721c6127 100644
--- a/source3/smbd/open.c
+++ b/source3/smbd/open.c
@@ -894,9 +894,10 @@ static void validate_my_share_entries(struct smbd_server_connection *sconn,
int num,
struct share_mode_entry *share_entry)
{
+ struct server_id self = messaging_server_id(sconn->msg_ctx);
files_struct *fsp;
- if (!procid_is_me(&share_entry->pid)) {
+ if (!procid_equal(&self, &share_entry->pid)) {
return;
}
@@ -1335,6 +1336,7 @@ static void defer_open(struct share_mode_lock *lck,
struct smb_request *req,
struct deferred_open_record *state)
{
+ struct server_id self = messaging_server_id(req->sconn->msg_ctx);
int i;
/* Paranoia check */
@@ -1343,7 +1345,7 @@ static void defer_open(struct share_mode_lock *lck,
struct share_mode_entry *e = &lck->data->share_modes[i];
if (is_deferred_open_entry(e) &&
- procid_is_me(&e->pid) &&
+ procid_equal(&self, &e->pid) &&
(e->op_mid == req->mid)) {
DEBUG(0, ("Trying to defer an already deferred "
"request: mid=%llu, exiting\n",
@@ -1364,8 +1366,7 @@ static void defer_open(struct share_mode_lock *lck,
state->id, (char *)state, sizeof(*state))) {
exit_server("push_deferred_open_message_smb failed");
}
- add_deferred_open(lck, req->mid, request_time,
- messaging_server_id(req->sconn->msg_ctx), state->id);
+ add_deferred_open(lck, req->mid, request_time, self, state->id);
}