diff options
author | Volker Lendecke <vl@samba.org> | 2019-10-09 21:38:04 +0200 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2019-11-06 20:36:34 +0000 |
commit | 54d673742f3a81ecdfb98f66a928d119293697ba (patch) | |
tree | fa58d1463508803e836bde6091283dad0a530dd7 /source3 | |
parent | b749c923373c7ccdc68ba2aed42c614e6a11d353 (diff) | |
download | samba-54d673742f3a81ecdfb98f66a928d119293697ba.tar.gz |
lib: Remove #define serverid_equal server_id_equal
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source3')
-rw-r--r-- | source3/include/proto.h | 1 | ||||
-rw-r--r-- | source3/lib/g_lock.c | 6 | ||||
-rw-r--r-- | source3/locking/brlock.c | 7 | ||||
-rw-r--r-- | source3/locking/locking.c | 2 | ||||
-rw-r--r-- | source3/locking/posix.c | 4 | ||||
-rw-r--r-- | source3/rpc_server/srvsvc/srv_srvsvc_nt.c | 5 | ||||
-rw-r--r-- | source3/smbd/open.c | 2 | ||||
-rw-r--r-- | source3/smbd/oplock.c | 2 | ||||
-rw-r--r-- | source3/smbd/sesssetup.c | 2 | ||||
-rw-r--r-- | source3/torture/test_g_lock.c | 2 | ||||
-rw-r--r-- | source3/utils/net_status.c | 2 | ||||
-rw-r--r-- | source3/utils/status.c | 2 |
12 files changed, 19 insertions, 18 deletions
diff --git a/source3/include/proto.h b/source3/include/proto.h index c98f7cfa351..cdec671dac3 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -399,7 +399,6 @@ uint32_t map_share_mode_to_deny_mode(uint32_t share_access, uint32_t private_opt #include "lib/util_procid.h" -#define serverid_equal(p1, p2) server_id_equal(p1,p2) struct server_id interpret_pid(const char *pid_string); bool is_offset_safe(const char *buf_base, size_t buf_len, char *ptr, size_t off); char *get_safe_ptr(const char *buf_base, size_t buf_len, char *ptr, size_t off); diff --git a/source3/lib/g_lock.c b/source3/lib/g_lock.c index ef6bbb52613..54caf924864 100644 --- a/source3/lib/g_lock.c +++ b/source3/lib/g_lock.c @@ -244,7 +244,7 @@ static NTSTATUS g_lock_trylock(struct db_record *rec, struct server_id self, g_lock_get_rec(&lck, i, &lock); - if (serverid_equal(&self, &lock.pid)) { + if (server_id_equal(&self, &lock.pid)) { if (lock.lock_type == type) { status = NT_STATUS_WAS_LOCKED; goto done; @@ -528,7 +528,7 @@ static void g_lock_unlock_fn(struct db_record *rec, for (i=0; i<lck.num_recs; i++) { struct g_lock_rec lockrec; g_lock_get_rec(&lck, i, &lockrec); - if (serverid_equal(&state->self, &lockrec.pid)) { + if (server_id_equal(&state->self, &lockrec.pid)) { break; } } @@ -601,7 +601,7 @@ static void g_lock_write_data_fn(struct db_record *rec, struct g_lock_rec lockrec; g_lock_get_rec(&lck, i, &lockrec); if ((lockrec.lock_type == G_LOCK_WRITE) && - serverid_equal(&state->self, &lockrec.pid)) { + server_id_equal(&state->self, &lockrec.pid)) { break; } } diff --git a/source3/locking/brlock.c b/source3/locking/brlock.c index f3fb75ef136..c0ff99a21c5 100644 --- a/source3/locking/brlock.c +++ b/source3/locking/brlock.c @@ -112,7 +112,7 @@ const struct GUID *brl_req_guid(const struct byte_range_lock *brl) static bool brl_same_context(const struct lock_context *ctx1, const struct lock_context *ctx2) { - return (serverid_equal(&ctx1->pid, &ctx2->pid) && + return (server_id_equal(&ctx1->pid, &ctx2->pid) && (ctx1->smblctx == ctx2->smblctx) && (ctx1->tid == ctx2->tid)); } @@ -1466,7 +1466,8 @@ void brl_close_fnum(struct byte_range_lock *br_lck) for (i=0; i < num_locks_copy; i++) { struct lock_struct *lock = &locks_copy[i]; - if (lock->context.tid == tid && serverid_equal(&lock->context.pid, &pid) && + if (lock->context.tid == tid && + server_id_equal(&lock->context.pid, &pid) && (lock->fnum == fnum)) { brl_unlock( br_lck, @@ -1525,7 +1526,7 @@ bool brl_mark_disconnected(struct files_struct *fsp) return false; } - if (!serverid_equal(&lock->context.pid, &self)) { + if (!server_id_equal(&lock->context.pid, &self)) { TALLOC_FREE(br_lck); return false; } diff --git a/source3/locking/locking.c b/source3/locking/locking.c index 568d2002229..f90458d9d4f 100644 --- a/source3/locking/locking.c +++ b/source3/locking/locking.c @@ -532,7 +532,7 @@ static bool rename_share_filename_fn( e->name_hash = state->new_name_hash; *modified = true; - ok = serverid_equal(&e->pid, &state->self); + ok = server_id_equal(&e->pid, &state->self); if (ok) { return false; } diff --git a/source3/locking/posix.c b/source3/locking/posix.c index 3b75cfe481a..91485133eb2 100644 --- a/source3/locking/posix.c +++ b/source3/locking/posix.c @@ -681,7 +681,7 @@ static struct lock_list *posix_lock_list(TALLOC_CTX *ctx, } /* Ignore locks not owned by this process. */ - if (!serverid_equal(&lock->context.pid, &lock_ctx->pid)) { + if (!server_id_equal(&lock->context.pid, &lock_ctx->pid)) { continue; } @@ -1223,7 +1223,7 @@ static bool locks_exist_on_context(const struct lock_struct *plocks, } /* Ignore locks not owned by this process. */ - if (!serverid_equal(&lock->context.pid, &lock_ctx->pid)) { + if (!server_id_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 6246a61672e..d4de3cdcfdd 100644 --- a/source3/rpc_server/srvsvc/srv_srvsvc_nt.c +++ b/source3/rpc_server/srvsvc/srv_srvsvc_nt.c @@ -862,7 +862,7 @@ static int count_sess_files_fn(struct file_id fid, */ struct sessionid *sess = &info->session_list[rh + i]; if ((e->uid == sess->uid) && - serverid_equal(&e->pid, &sess->pid)) { + server_id_equal(&e->pid, &sess->pid)) { info->ctr->array[i].num_open++; return 0; @@ -981,7 +981,8 @@ static int share_file_fn(struct file_id fid, if (strequal(d->servicepath, sfs->in_sharepath)) { for (i=0; i < sfs->resp_entries; i++) { - if (serverid_equal(&e->pid, &sfs->svrid_arr[offset + i])) { + if (server_id_equal( + &e->pid, &sfs->svrid_arr[offset + i])) { sfs->netconn_arr[i].num_open ++; return 0; } diff --git a/source3/smbd/open.c b/source3/smbd/open.c index 9493021c48d..2d4168c3ebe 100644 --- a/source3/smbd/open.c +++ b/source3/smbd/open.c @@ -1566,7 +1566,7 @@ static bool validate_my_share_entries_fn( struct validate_my_share_entries_state *state = private_data; files_struct *fsp; - if (!serverid_equal(&state->self, &e->pid)) { + if (!server_id_equal(&state->self, &e->pid)) { return false; } diff --git a/source3/smbd/oplock.c b/source3/smbd/oplock.c index b3da84b1269..e0a0fb8c41b 100644 --- a/source3/smbd/oplock.c +++ b/source3/smbd/oplock.c @@ -1040,7 +1040,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 (serverid_equal(&self, &src)) { + if (server_id_equal(&self, &src)) { wait_before_sending_break(); } diff --git a/source3/smbd/sesssetup.c b/source3/smbd/sesssetup.c index d359ef3607a..390933cd6cd 100644 --- a/source3/smbd/sesssetup.c +++ b/source3/smbd/sesssetup.c @@ -516,7 +516,7 @@ static int shutdown_other_smbds(struct smbXsrv_session_global0 *session, return 0; } - if (serverid_equal(&pid, &self_pid)) { + if (server_id_equal(&pid, &self_pid)) { DEBUG(10, ("It's me\n")); return 0; } diff --git a/source3/torture/test_g_lock.c b/source3/torture/test_g_lock.c index 352121e4194..615f7fcfbe8 100644 --- a/source3/torture/test_g_lock.c +++ b/source3/torture/test_g_lock.c @@ -421,7 +421,7 @@ static void lock4_check(const struct g_lock_rec *locks, return; } - if (!serverid_equal(&state->me, &locks[0].pid)) { + if (!server_id_equal(&state->me, &locks[0].pid)) { struct server_id_buf buf1, buf2; fprintf(stderr, "me=%s, locker=%s\n", server_id_str_buf(state->me, &buf1), diff --git a/source3/utils/net_status.c b/source3/utils/net_status.c index 939c3635d54..dd585ebc509 100644 --- a/source3/utils/net_status.c +++ b/source3/utils/net_status.c @@ -156,7 +156,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 (serverid_equal(&id, &crec->pid)) { + if (server_id_equal(&id, &crec->pid)) { guest = false; break; } diff --git a/source3/utils/status.c b/source3/utils/status.c index e60f9034688..36f7030e4f4 100644 --- a/source3/utils/status.c +++ b/source3/utils/status.c @@ -93,7 +93,7 @@ static unsigned int Ucrit_checkPid(struct server_id pid) return 1; for (i=0;i<Ucrit_MaxPid;i++) { - if (serverid_equal(&pid, &Ucrit_pid[i])) { + if (server_id_equal(&pid, &Ucrit_pid[i])) { return 1; } } |