summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/include/proto.h2
-rw-r--r--source3/lib/dbwrap/dbwrap_watch.c2
-rw-r--r--source3/lib/g_lock.c4
-rw-r--r--source3/lib/util.c2
-rw-r--r--source3/locking/brlock.c8
-rw-r--r--source3/locking/locking.c6
-rw-r--r--source3/locking/posix.c2
-rw-r--r--source3/rpc_server/srvsvc/srv_srvsvc_nt.c2
-rw-r--r--source3/smbd/close.c6
-rw-r--r--source3/smbd/notify_internal.c2
-rw-r--r--source3/smbd/open.c4
-rw-r--r--source3/smbd/oplock.c4
-rw-r--r--source3/smbd/sesssetup.c2
-rw-r--r--source3/utils/net_status.c2
-rw-r--r--source3/utils/status.c2
-rw-r--r--source3/web/statuspage.c4
16 files changed, 27 insertions, 27 deletions
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 64af7c2559..69661bb8c5 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -470,7 +470,7 @@ void set_my_unique_id(uint64_t unique_id);
struct server_id pid_to_procid(pid_t pid);
struct server_id procid_self(void);
struct server_id *new_server_id_task(TALLOC_CTX *mem_ctx);
-bool procid_equal(const struct server_id *p1, const struct server_id *p2);
+bool serverid_equal(const struct server_id *p1, const struct server_id *p2);
bool procid_is_me(const struct server_id *pid);
struct server_id interpret_pid(const char *pid_string);
char *procid_str_static(const struct server_id *pid);
diff --git a/source3/lib/dbwrap/dbwrap_watch.c b/source3/lib/dbwrap/dbwrap_watch.c
index ea75427ffc..701ac9d02f 100644
--- a/source3/lib/dbwrap/dbwrap_watch.c
+++ b/source3/lib/dbwrap/dbwrap_watch.c
@@ -166,7 +166,7 @@ static NTSTATUS dbwrap_record_del_watcher(TDB_DATA w_key, struct server_id id)
num_ids = value.dsize / sizeof(struct server_id);
for (i=0; i<num_ids; i++) {
- if (procid_equal(&id, &ids[i])) {
+ if (serverid_equal(&id, &ids[i])) {
ids[i] = ids[num_ids-1];
value.dsize -= sizeof(struct server_id);
break;
diff --git a/source3/lib/g_lock.c b/source3/lib/g_lock.c
index 06a14fac6c..d505b6bea6 100644
--- a/source3/lib/g_lock.c
+++ b/source3/lib/g_lock.c
@@ -119,7 +119,7 @@ static NTSTATUS g_lock_trylock(struct db_record *rec, struct server_id self,
}
for (i=0; i<num_locks; i++) {
- if (procid_equal(&self, &locks[i].pid)) {
+ if (serverid_equal(&self, &locks[i].pid)) {
status = NT_STATUS_INTERNAL_ERROR;
goto done;
}
@@ -327,7 +327,7 @@ NTSTATUS g_lock_unlock(struct g_lock_ctx *ctx, const char *name)
goto done;
}
for (i=0; i<num_locks; i++) {
- if (procid_equal(&self, &locks[i].pid)) {
+ if (serverid_equal(&self, &locks[i].pid)) {
break;
}
}
diff --git a/source3/lib/util.c b/source3/lib/util.c
index 2a01e2c9f9..653fff5c64 100644
--- a/source3/lib/util.c
+++ b/source3/lib/util.c
@@ -2058,7 +2058,7 @@ struct server_id *new_server_id_task(TALLOC_CTX *mem_ctx)
return server_id;
}
-bool procid_equal(const struct server_id *p1, const struct server_id *p2)
+bool serverid_equal(const struct server_id *p1, const struct server_id *p2)
{
if (p1->pid != p2->pid) {
return false;
diff --git a/source3/locking/brlock.c b/source3/locking/brlock.c
index 836bbb49a7..7150936253 100644
--- a/source3/locking/brlock.c
+++ b/source3/locking/brlock.c
@@ -69,7 +69,7 @@ static void print_lock_struct(unsigned int i, struct lock_struct *pls)
bool brl_same_context(const struct lock_context *ctx1,
const struct lock_context *ctx2)
{
- return (procid_equal(&ctx1->pid, &ctx2->pid) &&
+ return (serverid_equal(&ctx1->pid, &ctx2->pid) &&
(ctx1->smblctx == ctx2->smblctx) &&
(ctx1->tid == ctx2->tid));
}
@@ -252,7 +252,7 @@ NTSTATUS brl_lock_failed(files_struct *fsp, const struct lock_struct *lock, bool
return NT_STATUS_FILE_LOCK_CONFLICT;
}
- if (procid_equal(&lock->context.pid, &fsp->last_lock_failure.context.pid) &&
+ if (serverid_equal(&lock->context.pid, &fsp->last_lock_failure.context.pid) &&
lock->context.tid == fsp->last_lock_failure.context.tid &&
lock->fnum == fsp->last_lock_failure.fnum &&
lock->start == fsp->last_lock_failure.start) {
@@ -1509,7 +1509,7 @@ void brl_close_fnum(struct messaging_context *msg_ctx,
for (i=0; i < num_locks_copy; i++) {
struct lock_struct *lock = &locks_copy[i];
- if (lock->context.tid == tid && procid_equal(&lock->context.pid, &pid) &&
+ if (lock->context.tid == tid && serverid_equal(&lock->context.pid, &pid) &&
(lock->fnum == fnum)) {
brl_unlock(msg_ctx,
br_lck,
@@ -1958,7 +1958,7 @@ void brl_revalidate(struct messaging_context *msg_ctx,
ZERO_STRUCT(last_pid);
for (i=0; i<state->num_pids; i++) {
- if (procid_equal(&last_pid, &state->pids[i])) {
+ if (serverid_equal(&last_pid, &state->pids[i])) {
/*
* We've seen that one already
*/
diff --git a/source3/locking/locking.c b/source3/locking/locking.c
index c7d8fb4fa4..95e9b77553 100644
--- a/source3/locking/locking.c
+++ b/source3/locking/locking.c
@@ -553,7 +553,7 @@ bool rename_share_filename(struct messaging_context *msg_ctx,
se->name_hash = new_name_hash;
/* But not to ourselves... */
- if (procid_equal(&se->pid, &self_pid)) {
+ if (serverid_equal(&se->pid, &self_pid)) {
continue;
}
@@ -755,7 +755,7 @@ static bool share_modes_identical(struct share_mode_entry *e1,
sharing the same share mode entry may validly differ in
fsp->share_access field. */
- return (procid_equal(&e1->pid, &e2->pid) &&
+ return (serverid_equal(&e1->pid, &e2->pid) &&
file_id_equal(&e1->id, &e2->id) &&
e1->share_file_id == e2->share_file_id );
}
@@ -763,7 +763,7 @@ static bool share_modes_identical(struct share_mode_entry *e1,
static bool deferred_open_identical(struct share_mode_entry *e1,
struct share_mode_entry *e2)
{
- return (procid_equal(&e1->pid, &e2->pid) &&
+ return (serverid_equal(&e1->pid, &e2->pid) &&
(e1->op_mid == e2->op_mid) &&
file_id_equal(&e1->id, &e2->id));
}
diff --git a/source3/locking/posix.c b/source3/locking/posix.c
index 02d9b6d3e3..e5320f8705 100644
--- a/source3/locking/posix.c
+++ b/source3/locking/posix.c
@@ -777,7 +777,7 @@ static struct lock_list *posix_lock_list(TALLOC_CTX *ctx,
}
/* Ignore locks not owned by this process. */
- if (!procid_equal(&lock->context.pid, &lock_ctx->pid)) {
+ if (!serverid_equal(&lock->context.pid, &lock_ctx->pid)) {
continue;
}
diff --git a/source3/rpc_server/srvsvc/srv_srvsvc_nt.c b/source3/rpc_server/srvsvc/srv_srvsvc_nt.c
index d351468dce..6702784ff5 100644
--- a/source3/rpc_server/srvsvc/srv_srvsvc_nt.c
+++ b/source3/rpc_server/srvsvc/srv_srvsvc_nt.c
@@ -856,7 +856,7 @@ static void sess_file_fn( const struct share_mode_entry *e,
{
struct sess_file_count *sess = (struct sess_file_count *)data;
- if ( procid_equal(&e->pid, &sess->pid) && (sess->uid == e->uid) ) {
+ if (serverid_equal(&e->pid, &sess->pid) && (sess->uid == e->uid)) {
sess->count++;
}
diff --git a/source3/smbd/close.c b/source3/smbd/close.c
index 1fb7bdeb84..a3eedbfa6b 100644
--- a/source3/smbd/close.c
+++ b/source3/smbd/close.c
@@ -232,7 +232,7 @@ static void notify_deferred_opens(struct smbd_server_connection *sconn,
for (i=0; i<num_deferred; i++) {
struct share_mode_entry *e = &deferred[i];
- if (procid_equal(&self, &e->pid)) {
+ if (serverid_equal(&self, &e->pid)) {
/*
* We need to notify ourself to retry the open. Do
* this by finding the queued SMB record, moving it to
@@ -427,7 +427,7 @@ static NTSTATUS close_remove_share_mode(files_struct *fsp,
&& (e->flags & SHARE_MODE_FLAG_POSIX_OPEN)) {
continue;
}
- if (procid_equal(&self, &e->pid) &&
+ if (serverid_equal(&self, &e->pid) &&
(e->share_file_id == fsp->fh->gen_id)) {
continue;
}
@@ -1103,7 +1103,7 @@ static NTSTATUS close_directory(struct smb_request *req, files_struct *fsp,
if (fsp->posix_open && (e->flags & SHARE_MODE_FLAG_POSIX_OPEN)) {
continue;
}
- if (procid_equal(&self, &e->pid) &&
+ if (serverid_equal(&self, &e->pid) &&
(e->share_file_id == fsp->fh->gen_id)) {
continue;
}
diff --git a/source3/smbd/notify_internal.c b/source3/smbd/notify_internal.c
index 9af3b459ff..4fb1b351f3 100644
--- a/source3/smbd/notify_internal.c
+++ b/source3/smbd/notify_internal.c
@@ -453,7 +453,7 @@ static NTSTATUS notify_del_entry(struct db_record *rec,
if (e->private_data != private_data) {
continue;
}
- if (procid_equal(&e->server, pid)) {
+ if (serverid_equal(&e->server, pid)) {
break;
}
}
diff --git a/source3/smbd/open.c b/source3/smbd/open.c
index 26d6971a42..273f3b2c1e 100644
--- a/source3/smbd/open.c
+++ b/source3/smbd/open.c
@@ -913,7 +913,7 @@ static void validate_my_share_entries(struct smbd_server_connection *sconn,
struct server_id self = messaging_server_id(sconn->msg_ctx);
files_struct *fsp;
- if (!procid_equal(&self, &share_entry->pid)) {
+ if (!serverid_equal(&self, &share_entry->pid)) {
return;
}
@@ -1363,7 +1363,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_equal(&self, &e->pid) &&
+ serverid_equal(&self, &e->pid) &&
(e->op_mid == req->mid)) {
DEBUG(0, ("Trying to defer an already deferred "
"request: mid=%llu, exiting\n",
diff --git a/source3/smbd/oplock.c b/source3/smbd/oplock.c
index 54d95a25b5..406ffd1e3d 100644
--- a/source3/smbd/oplock.c
+++ b/source3/smbd/oplock.c
@@ -564,7 +564,7 @@ static void process_oplock_break_message(struct messaging_context *msg_ctx,
/* Need to wait before sending a break
message if we sent ourselves this message. */
- if (procid_equal(&self, &src)) {
+ if (serverid_equal(&self, &src)) {
wait_before_sending_break();
}
@@ -876,7 +876,7 @@ static void do_break_to_none(struct tevent_req *req)
* Bugid #5980.
*/
- if (procid_equal(&self, &share_entry->pid)) {
+ if (serverid_equal(&self, &share_entry->pid)) {
struct files_struct *cur_fsp =
initial_break_processing(state->sconn,
share_entry->id,
diff --git a/source3/smbd/sesssetup.c b/source3/smbd/sesssetup.c
index 2658a3a27f..81e56eb208 100644
--- a/source3/smbd/sesssetup.c
+++ b/source3/smbd/sesssetup.c
@@ -343,7 +343,7 @@ static int shutdown_other_smbds(const struct connections_key *key,
return 0;
}
- if (procid_equal(&crec->pid, &self_pid)) {
+ if (serverid_equal(&crec->pid, &self_pid)) {
DEBUG(10, ("It's me\n"));
return 0;
}
diff --git a/source3/utils/net_status.c b/source3/utils/net_status.c
index 85d023505e..c96730f1c1 100644
--- a/source3/utils/net_status.c
+++ b/source3/utils/net_status.c
@@ -152,7 +152,7 @@ static int show_share_parseable(const struct connections_key *key,
for (i=0; i<ids->num_entries; i++) {
struct server_id id = ids->entries[i].pid;
- if (procid_equal(&id, &crec->pid)) {
+ if (serverid_equal(&id, &crec->pid)) {
guest = false;
break;
}
diff --git a/source3/utils/status.c b/source3/utils/status.c
index 5ff4c31470..3d16f8e3e7 100644
--- a/source3/utils/status.c
+++ b/source3/utils/status.c
@@ -88,7 +88,7 @@ static unsigned int Ucrit_checkPid(struct server_id pid)
return 1;
for (i=0;i<Ucrit_MaxPid;i++) {
- if (procid_equal(&pid, &Ucrit_pid[i])) {
+ if (serverid_equal(&pid, &Ucrit_pid[i])) {
return 1;
}
}
diff --git a/source3/web/statuspage.c b/source3/web/statuspage.c
index dd83d158ae..8eac8036d0 100644
--- a/source3/web/statuspage.c
+++ b/source3/web/statuspage.c
@@ -89,7 +89,7 @@ static char *mapPid2Machine (struct server_id pid)
/* show machine name rather PID on table "Open Files"? */
if (PID_or_Machine) {
for (map = pidmap; map != NULL; map = map->next) {
- if (procid_equal(&pid, &map->pid)) {
+ if (serverid_equal(&pid, &map->pid)) {
if (map->machine == NULL) /* no machine name */
break; /* show PID */
@@ -207,7 +207,7 @@ static int traverse_fn2(const struct connections_key *key,
void *private_data)
{
if (crec->cnum == TID_FIELD_INVALID || !process_exists(crec->pid) ||
- procid_equal(&crec->pid, &smbd_pid))
+ serverid_equal(&crec->pid, &smbd_pid))
return 0;
addPid2Machine (crec->pid, crec->machine);