diff options
author | Volker Lendecke <vlendec@samba.org> | 2007-05-07 09:35:35 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:21:52 -0500 |
commit | e6383f47629368d9dd4e803f17566a24e9d7359e (patch) | |
tree | cebde89910087c3220786f209da2c4e32a71bc46 /source3 | |
parent | d1153fc79076741571b203b1d70f1536bde208f0 (diff) | |
download | samba-e6383f47629368d9dd4e803f17566a24e9d7359e.tar.gz |
r22736: Start to merge the low-hanging fruit from the now 7000-line cluster patch.
This changes "struct process_id" to "struct server_id", keeping both is
just too much hassle. No functional change (I hope ;-))
Volker
(This used to be commit 0ad4b1226c9d91b72136310d3bbb640d2c5d67b8)
Diffstat (limited to 'source3')
37 files changed, 149 insertions, 160 deletions
diff --git a/source3/include/locking.h b/source3/include/locking.h index a62b461c10f..cc4d83fdcd4 100644 --- a/source3/include/locking.h +++ b/source3/include/locking.h @@ -39,7 +39,7 @@ enum brl_flavour {WINDOWS_LOCK = 0, POSIX_LOCK = 1}; struct lock_context { uint32 smbpid; uint16 tid; - struct process_id pid; + struct server_id pid; }; /* The key used in the brlock database. */ @@ -61,13 +61,13 @@ struct byte_range_lock { }; #define BRLOCK_FN_CAST() \ - void (*)(SMB_DEV_T dev, SMB_INO_T ino, struct process_id pid, \ + void (*)(SMB_DEV_T dev, SMB_INO_T ino, struct server_id pid, \ enum brl_type lock_type, \ enum brl_flavour lock_flav, \ br_off start, br_off size) #define BRLOCK_FN(fn) \ - void (*fn)(SMB_DEV_T dev, SMB_INO_T ino, struct process_id pid, \ + void (*fn)(SMB_DEV_T dev, SMB_INO_T ino, struct server_id pid, \ enum brl_type lock_type, \ enum brl_flavour lock_flav, \ br_off start, br_off size) diff --git a/source3/include/messages.h b/source3/include/messages.h index 7cd0e023487..e3f29832add 100644 --- a/source3/include/messages.h +++ b/source3/include/messages.h @@ -96,16 +96,8 @@ #define FLAG_MSG_PRINT_NOTIFY 0x0008 #define FLAG_MSG_PRINT_GENERAL 0x0010 -struct process_id { - pid_t pid; -}; - -/* - * Samba4 API compatibility layer - */ - struct server_id { - struct process_id id; + pid_t pid; }; #endif diff --git a/source3/include/smb.h b/source3/include/smb.h index 6c44db5a348..f903772254c 100644 --- a/source3/include/smb.h +++ b/source3/include/smb.h @@ -744,7 +744,7 @@ struct pending_message_list { /* struct returned by get_share_modes */ struct share_mode_entry { - struct process_id pid; + struct server_id pid; uint16 op_mid; uint16 op_type; uint32 access_mask; /* NTCreateX access bits (FILE_READ_DATA etc.) */ @@ -764,7 +764,7 @@ struct share_mode_entry { /* oplock break message definition - linearization of share_mode_entry. Offset Data length. -0 struct process_id pid 4 +0 struct server_id pid 4 4 uint16 op_mid 2 6 uint16 op_type 2 8 uint32 access_mask 4 @@ -822,7 +822,7 @@ struct locking_data { /* Used to store pipe open records for NetFileEnum() */ struct pipe_open_rec { - struct process_id pid; + struct server_id pid; uid_t uid; int pnum; fstring name; @@ -869,14 +869,14 @@ struct pipe_open_rec { /* key and data in the connections database - used in smbstatus and smbd */ struct connections_key { - struct process_id pid; + struct server_id pid; int cnum; fstring name; }; struct connections_data { int magic; - struct process_id pid; + struct server_id pid; int cnum; uid_t uid; gid_t gid; diff --git a/source3/include/smb_share_modes.h b/source3/include/smb_share_modes.h index 5ed43bda336..937a39c97a5 100644 --- a/source3/include/smb_share_modes.h +++ b/source3/include/smb_share_modes.h @@ -51,7 +51,7 @@ struct smb_share_mode_entry { uint32_t access_mask; struct timeval open_time; uint32_t file_id; - struct process_id pid; + struct server_id pid; }; /* diff --git a/source3/lib/debug.c b/source3/lib/debug.c index 62fda5741c9..d231f555854 100644 --- a/source3/lib/debug.c +++ b/source3/lib/debug.c @@ -471,7 +471,7 @@ BOOL debug_parse_levels(const char *params_str) Receive a "set debug level" message. ****************************************************************************/ -static void debug_message(int msg_type, struct process_id src, +static void debug_message(int msg_type, struct server_id src, void *buf, size_t len, void *private_data) { const char *params_str = (const char *)buf; @@ -508,7 +508,7 @@ void debug_message_send(pid_t pid, const char *params_str) Return current debug level. ****************************************************************************/ -static void debuglevel_message(int msg_type, struct process_id src, +static void debuglevel_message(int msg_type, struct server_id src, void *buf, size_t len, void *private_data) { char *message = debug_list_class_names_and_levels(); diff --git a/source3/lib/dmallocmsg.c b/source3/lib/dmallocmsg.c index fed7bf59c52..bccede3515c 100644 --- a/source3/lib/dmallocmsg.c +++ b/source3/lib/dmallocmsg.c @@ -36,7 +36,7 @@ static unsigned long our_dm_mark = 0; * usage stats. **/ static void msg_req_dmalloc_mark(int UNUSED(msg_type), - struct process_id UNUSED(src_pid), + struct server_id UNUSED(src_pid), void *UNUSED(buf), size_t UNUSED(len), void *private_data) { @@ -51,7 +51,7 @@ static void msg_req_dmalloc_mark(int UNUSED(msg_type), static void msg_req_dmalloc_log_changed(int UNUSED(msg_type), - struct process_id UNUSED(src_pid), + struct server_id UNUSED(src_pid), void *UNUSED(buf), size_t UNUSED(len), void *private_data) { diff --git a/source3/lib/messages.c b/source3/lib/messages.c index 94caca69b70..6ecb89571b2 100644 --- a/source3/lib/messages.c +++ b/source3/lib/messages.c @@ -57,8 +57,8 @@ static int received_signal; struct message_rec { int msg_version; int msg_type; - struct process_id dest; - struct process_id src; + struct server_id dest; + struct server_id src; size_t len; }; @@ -66,7 +66,7 @@ struct message_rec { static struct dispatch_fns { struct dispatch_fns *next, *prev; int msg_type; - void (*fn)(int msg_type, struct process_id pid, void *buf, size_t len, + void (*fn)(int msg_type, struct server_id pid, void *buf, size_t len, void *private_data); void *private_data; } *dispatch_fns; @@ -103,7 +103,7 @@ static void sig_usr1(void) A useful function for testing the message system. ****************************************************************************/ -static void ping_message(int msg_type, struct process_id src, +static void ping_message(int msg_type, struct server_id src, void *buf, size_t len, void *private_data) { const char *msg = buf ? (const char *)buf : "none"; @@ -152,7 +152,7 @@ BOOL message_init(void) Form a static tdb key from a pid. ******************************************************************/ -static TDB_DATA message_key_pid(struct process_id pid) +static TDB_DATA message_key_pid(struct server_id pid) { static char key[20]; TDB_DATA kbuf; @@ -169,7 +169,7 @@ static TDB_DATA message_key_pid(struct process_id pid) then delete its record in the database. ****************************************************************************/ -static NTSTATUS message_notify(struct process_id procid) +static NTSTATUS message_notify(struct server_id procid) { pid_t pid = procid.pid; int ret; @@ -229,7 +229,7 @@ static NTSTATUS message_notify(struct process_id procid) Send a message to a particular pid. ****************************************************************************/ -static NTSTATUS message_send_pid_internal(struct process_id pid, int msg_type, +static NTSTATUS message_send_pid_internal(struct server_id pid, int msg_type, const void *buf, size_t len, BOOL duplicates_allowed, unsigned int timeout) @@ -365,7 +365,7 @@ static NTSTATUS message_send_pid_internal(struct process_id pid, int msg_type, Send a message to a particular pid - no timeout. ****************************************************************************/ -NTSTATUS message_send_pid(struct process_id pid, int msg_type, const void *buf, +NTSTATUS message_send_pid(struct server_id pid, int msg_type, const void *buf, size_t len, BOOL duplicates_allowed) { return message_send_pid_internal(pid, msg_type, buf, len, @@ -376,7 +376,7 @@ NTSTATUS message_send_pid(struct process_id pid, int msg_type, const void *buf, Send a message to a particular pid, with timeout in seconds. ****************************************************************************/ -NTSTATUS message_send_pid_with_timeout(struct process_id pid, int msg_type, +NTSTATUS message_send_pid_with_timeout(struct server_id pid, int msg_type, const void *buf, size_t len, BOOL duplicates_allowed, unsigned int timeout) { @@ -388,7 +388,7 @@ NTSTATUS message_send_pid_with_timeout(struct process_id pid, int msg_type, Count the messages pending for a particular pid. Expensive.... ****************************************************************************/ -unsigned int messages_pending_for_pid(struct process_id pid) +unsigned int messages_pending_for_pid(struct server_id pid) { TDB_DATA kbuf; TDB_DATA dbuf; @@ -459,7 +459,7 @@ static BOOL retrieve_all_messages(char **msgs_buf, size_t *total_len) ****************************************************************************/ static BOOL message_recv(char *msgs_buf, size_t total_len, int *msg_type, - struct process_id *src, char **buf, size_t *len) + struct server_id *src, char **buf, size_t *len) { struct message_rec rec; char *ret_buf = *buf; @@ -501,7 +501,7 @@ static BOOL message_recv(char *msgs_buf, size_t total_len, int *msg_type, void message_dispatch(void) { int msg_type; - struct process_id src; + struct server_id src; char *buf; char *msgs_buf; size_t len, total_len; @@ -552,7 +552,7 @@ void message_dispatch(void) ****************************************************************************/ void message_register(int msg_type, - void (*fn)(int msg_type, struct process_id pid, + void (*fn)(int msg_type, struct server_id pid, void *buf, size_t len, void *private_data), void *private_data) @@ -760,7 +760,7 @@ struct messaging_context *messaging_init(TALLOC_CTX *mem_ctx, return ctx; } -static void messaging_callback(int msg_type, struct process_id pid, +static void messaging_callback(int msg_type, struct server_id pid, void *buf, size_t len, void *private_data) { struct messaging_context *ctx = talloc_get_type_abort( @@ -775,13 +775,11 @@ static void messaging_callback(int msg_type, struct process_id pid, if (msg_type == cb->msg_type) { DATA_BLOB blob; - struct server_id id; blob.data = (uint8 *)buf; blob.length = len; - id.id = pid; - cb->fn(ctx, cb->private_data, msg_type, id, &blob); + cb->fn(ctx, cb->private_data, msg_type, pid, &blob); } } } @@ -838,7 +836,7 @@ NTSTATUS messaging_send(struct messaging_context *msg, struct server_id server, uint32_t msg_type, DATA_BLOB *data) { - return message_send_pid_internal(server.id, msg_type, data->data, + return message_send_pid_internal(server, msg_type, data->data, data->length, True, 0); } diff --git a/source3/lib/tallocmsg.c b/source3/lib/tallocmsg.c index 0f493538f3c..098f8a03d91 100644 --- a/source3/lib/tallocmsg.c +++ b/source3/lib/tallocmsg.c @@ -65,7 +65,7 @@ static void msg_pool_usage_helper(const void *ptr, int depth, int max_depth, int * Respond to a POOL_USAGE message by sending back string form of memory * usage stats. **/ -void msg_pool_usage(int msg_type, struct process_id src_pid, +void msg_pool_usage(int msg_type, struct server_id src_pid, void *UNUSED(buf), size_t UNUSED(len), void *private_data) { diff --git a/source3/lib/util.c b/source3/lib/util.c index 9a22e89fe21..4425c2e1cc2 100644 --- a/source3/lib/util.c +++ b/source3/lib/util.c @@ -1527,7 +1527,7 @@ BOOL same_net(struct in_addr ip1,struct in_addr ip2,struct in_addr mask) Check if a process exists. Does this work on all unixes? ****************************************************************************/ -BOOL process_exists(const struct process_id pid) +BOOL process_exists(const struct server_id pid) { if (procid_is_me(&pid)) { return True; @@ -3061,31 +3061,29 @@ uint32 map_share_mode_to_deny_mode(uint32 share_access, uint32 private_options) return (uint32)-1; } -pid_t procid_to_pid(const struct process_id *proc) +pid_t procid_to_pid(const struct server_id *proc) { return proc->pid; } -struct process_id pid_to_procid(pid_t pid) +struct server_id pid_to_procid(pid_t pid) { - struct process_id result; + struct server_id result; result.pid = pid; return result; } -struct process_id procid_self(void) +struct server_id procid_self(void) { return pid_to_procid(sys_getpid()); } struct server_id server_id_self(void) { - struct server_id id; - id.id = procid_self(); - return id; + return procid_self(); } -BOOL procid_equal(const struct process_id *p1, const struct process_id *p2) +BOOL procid_equal(const struct server_id *p1, const struct server_id *p2) { return (p1->pid == p2->pid); } @@ -3093,37 +3091,37 @@ BOOL procid_equal(const struct process_id *p1, const struct process_id *p2) BOOL cluster_id_equal(const struct server_id *id1, const struct server_id *id2) { - return procid_equal(&id1->id, &id2->id); + return procid_equal(id1, id2); } -BOOL procid_is_me(const struct process_id *pid) +BOOL procid_is_me(const struct server_id *pid) { return (pid->pid == sys_getpid()); } -struct process_id interpret_pid(const char *pid_string) +struct server_id interpret_pid(const char *pid_string) { return pid_to_procid(atoi(pid_string)); } -char *procid_str_static(const struct process_id *pid) +char *procid_str_static(const struct server_id *pid) { static fstring str; fstr_sprintf(str, "%d", pid->pid); return str; } -char *procid_str(TALLOC_CTX *mem_ctx, const struct process_id *pid) +char *procid_str(TALLOC_CTX *mem_ctx, const struct server_id *pid) { return talloc_strdup(mem_ctx, procid_str_static(pid)); } -BOOL procid_valid(const struct process_id *pid) +BOOL procid_valid(const struct server_id *pid) { return (pid->pid != -1); } -BOOL procid_is_local(const struct process_id *pid) +BOOL procid_is_local(const struct server_id *pid) { return True; } diff --git a/source3/librpc/ndr/ndr_misc.c b/source3/librpc/ndr/ndr_misc.c index 54face8d7a0..a0796924a2a 100644 --- a/source3/librpc/ndr/ndr_misc.c +++ b/source3/librpc/ndr/ndr_misc.c @@ -243,7 +243,7 @@ NTSTATUS ndr_push_server_id(struct ndr_push *ndr, int ndr_flags, const struct se if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, - (uint32_t)r->id.pid)); + (uint32_t)r->pid)); } if (ndr_flags & NDR_BUFFERS) { } @@ -256,7 +256,7 @@ NTSTATUS ndr_pull_server_id(struct ndr_pull *ndr, int ndr_flags, struct server_i uint32_t pid; NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &pid)); - r->id.pid = (pid_t)pid; + r->pid = (pid_t)pid; } if (ndr_flags & NDR_BUFFERS) { } @@ -267,6 +267,6 @@ void ndr_print_server_id(struct ndr_print *ndr, const char *name, const struct s { ndr_print_struct(ndr, name, "server_id"); ndr->depth++; - ndr_print_uint32(ndr, "id", (uint32_t)r->id.pid); + ndr_print_uint32(ndr, "id", (uint32_t)r->pid); ndr->depth--; } diff --git a/source3/libsmb/smb_share_modes.c b/source3/libsmb/smb_share_modes.c index 53f99d0f50e..da8d9e1fdc5 100644 --- a/source3/libsmb/smb_share_modes.c +++ b/source3/libsmb/smb_share_modes.c @@ -42,12 +42,12 @@ int smb_create_share_mode_entry_ex(struct smbdb_ctx *db_ctx, uint64_t dev, uint64_t ino, const struct smb_share_mode_entry *new_entry, const char *sharepath, const char *filename); -static BOOL sharemodes_procid_equal(const struct process_id *p1, const struct process_id *p2) +static BOOL sharemodes_procid_equal(const struct server_id *p1, const struct server_id *p2) { return (p1->pid == p2->pid); } -static pid_t sharemodes_procid_to_pid(const struct process_id *proc) +static pid_t sharemodes_procid_to_pid(const struct server_id *proc) { return proc->pid; } @@ -211,7 +211,7 @@ int smb_get_share_mode_entries(struct smbdb_ctx *db_ctx, for (i = 0; i < num_share_modes; i++) { struct share_mode_entry *share = &shares[i]; struct smb_share_mode_entry *sme = &list[list_num]; - struct process_id pid = share->pid; + struct server_id pid = share->pid; /* Check this process really exists. */ if (kill(sharemodes_procid_to_pid(&pid), 0) == -1 && (errno == ESRCH)) { @@ -416,7 +416,7 @@ int smb_delete_share_mode_entry(struct smbdb_ctx *db_ctx, num_share_modes = 0; for (i = 0; i < orig_num_share_modes; i++) { struct share_mode_entry *share = &shares[i]; - struct process_id pid = share->pid; + struct server_id pid = share->pid; /* Check this process really exists. */ if (kill(sharemodes_procid_to_pid(&pid), 0) == -1 && (errno == ESRCH)) { @@ -492,7 +492,7 @@ int smb_change_share_mode_entry(struct smbdb_ctx *db_ctx, for (i = 0; i < num_share_modes; i++) { struct share_mode_entry *share = &shares[i]; - struct process_id pid = share->pid; + struct server_id pid = share->pid; /* Check this process really exists. */ if (kill(sharemodes_procid_to_pid(&pid), 0) == -1 && (errno == ESRCH)) { diff --git a/source3/locking/brlock.c b/source3/locking/brlock.c index 88f993e14b4..c3a3ce1cb62 100644 --- a/source3/locking/brlock.c +++ b/source3/locking/brlock.c @@ -724,7 +724,7 @@ static NTSTATUS brl_lock_posix(struct byte_range_lock *br_lck, NTSTATUS brl_lock(struct byte_range_lock *br_lck, uint32 smbpid, - struct process_id pid, + struct server_id pid, br_off start, br_off size, enum brl_type lock_type, @@ -1039,7 +1039,7 @@ static BOOL brl_unlock_posix(struct byte_range_lock *br_lck, const struct lock_s BOOL brl_unlock(struct byte_range_lock *br_lck, uint32 smbpid, - struct process_id pid, + struct server_id pid, br_off start, br_off size, enum brl_flavour lock_flav) @@ -1069,7 +1069,7 @@ BOOL brl_unlock(struct byte_range_lock *br_lck, BOOL brl_locktest(struct byte_range_lock *br_lck, uint32 smbpid, - struct process_id pid, + struct server_id pid, br_off start, br_off size, enum brl_type lock_type, @@ -1127,7 +1127,7 @@ BOOL brl_locktest(struct byte_range_lock *br_lck, NTSTATUS brl_lockquery(struct byte_range_lock *br_lck, uint32 *psmbpid, - struct process_id pid, + struct server_id pid, br_off *pstart, br_off *psize, enum brl_type *plock_type, @@ -1195,7 +1195,7 @@ NTSTATUS brl_lockquery(struct byte_range_lock *br_lck, BOOL brl_lock_cancel(struct byte_range_lock *br_lck, uint32 smbpid, - struct process_id pid, + struct server_id pid, br_off start, br_off size, enum brl_flavour lock_flav) @@ -1252,7 +1252,7 @@ void brl_close_fnum(struct byte_range_lock *br_lck) unsigned int i, j, dcount=0; int num_deleted_windows_locks = 0; struct lock_struct *locks = br_lck->lock_data; - struct process_id pid = procid_self(); + struct server_id pid = procid_self(); BOOL unlock_individually = False; if(lp_posix_locking(fsp->conn->params)) { diff --git a/source3/nmbd/nmbd.c b/source3/nmbd/nmbd.c index 3a18e667740..6e0de362b98 100644 --- a/source3/nmbd/nmbd.c +++ b/source3/nmbd/nmbd.c @@ -67,7 +67,7 @@ static void terminate(void) Handle a SHUTDOWN message from smbcontrol. **************************************************************************** */ -static void nmbd_terminate(int msg_type, struct process_id src, +static void nmbd_terminate(int msg_type, struct server_id src, void *buf, size_t len, void *private_data) { terminate(); @@ -262,7 +262,7 @@ static BOOL reload_nmbd_services(BOOL test) * detects that there are no subnets. **************************************************************************** */ -static void msg_reload_nmbd_services(int msg_type, struct process_id src, +static void msg_reload_nmbd_services(int msg_type, struct server_id src, void *buf, size_t len, void *private_data) { write_browse_list( 0, True ); @@ -279,7 +279,7 @@ static void msg_reload_nmbd_services(int msg_type, struct process_id src, } } -static void msg_nmbd_send_packet(int msg_type, struct process_id src, +static void msg_nmbd_send_packet(int msg_type, struct server_id src, void *buf, size_t len, void *private_data) { struct packet_struct *p = (struct packet_struct *)buf; diff --git a/source3/nmbd/nmbd_elections.c b/source3/nmbd/nmbd_elections.c index eb6f1b6e0aa..a053d0803b0 100644 --- a/source3/nmbd/nmbd_elections.c +++ b/source3/nmbd/nmbd_elections.c @@ -378,7 +378,7 @@ yet registered on subnet %s\n", nmb_namestr(&nmbname), subrec->subnet_name )); Process a internal Samba message forcing an election. ***************************************************************************/ -void nmbd_message_election(int msg_type, struct process_id src, +void nmbd_message_election(int msg_type, struct server_id src, void *buf, size_t len, void *private_data) { struct subnet_record *subrec; diff --git a/source3/nmbd/nmbd_winsserver.c b/source3/nmbd/nmbd_winsserver.c index 9c2fe727020..fc9b95491c5 100644 --- a/source3/nmbd/nmbd_winsserver.c +++ b/source3/nmbd/nmbd_winsserver.c @@ -2370,7 +2370,7 @@ void wins_write_database(time_t t, BOOL background) Process a internal Samba message receiving a wins record. ***************************************************************************/ -void nmbd_wins_new_entry(int msg_type, struct process_id src, +void nmbd_wins_new_entry(int msg_type, struct server_id src, void *buf, size_t len, void *private_data) { WINS_RECORD *record; diff --git a/source3/nsswitch/winbindd.c b/source3/nsswitch/winbindd.c index 9c5cd3b0e38..57591fb6c24 100644 --- a/source3/nsswitch/winbindd.c +++ b/source3/nsswitch/winbindd.c @@ -171,7 +171,7 @@ static void sigchld_handler(int signum) } /* React on 'smbcontrol winbindd reload-config' in the same way as on SIGHUP*/ -static void msg_reload_services(int msg_type, struct process_id src, +static void msg_reload_services(int msg_type, struct server_id src, void *buf, size_t len, void *private_data) { /* Flush various caches */ @@ -180,7 +180,7 @@ static void msg_reload_services(int msg_type, struct process_id src, } /* React on 'smbcontrol winbindd shutdown' in the same way as on SIGTERM*/ -static void msg_shutdown(int msg_type, struct process_id src, +static void msg_shutdown(int msg_type, struct server_id src, void *buf, size_t len, void *private_data) { do_sigterm = True; diff --git a/source3/nsswitch/winbindd_cm.c b/source3/nsswitch/winbindd_cm.c index 82c85d62461..a0d12ee62cd 100644 --- a/source3/nsswitch/winbindd_cm.c +++ b/source3/nsswitch/winbindd_cm.c @@ -82,7 +82,7 @@ static BOOL get_dcs(TALLOC_CTX *mem_ctx, const struct winbindd_domain *domain, Child failed to find DC's. Reschedule check. ****************************************************************/ -static void msg_failed_to_go_online(int msg_type, struct process_id src, +static void msg_failed_to_go_online(int msg_type, struct server_id src, void *buf, size_t len, void *private_data) { struct winbindd_domain *domain; @@ -118,7 +118,7 @@ static void msg_failed_to_go_online(int msg_type, struct process_id src, Actually cause a reconnect from a message. ****************************************************************/ -static void msg_try_to_go_online(int msg_type, struct process_id src, +static void msg_try_to_go_online(int msg_type, struct server_id src, void *buf, size_t len, void *private_data) { struct winbindd_domain *domain; diff --git a/source3/nsswitch/winbindd_dual.c b/source3/nsswitch/winbindd_dual.c index 58ed19be32d..fb335b56a51 100644 --- a/source3/nsswitch/winbindd_dual.c +++ b/source3/nsswitch/winbindd_dual.c @@ -478,7 +478,7 @@ void winbindd_flush_negative_conn_cache(struct winbindd_domain *domain) /* Set our domains as offline and forward the offline message to our children. */ -void winbind_msg_offline(int msg_type, struct process_id src, +void winbind_msg_offline(int msg_type, struct server_id src, void *buf, size_t len, void *private_data) { struct winbindd_child *child; @@ -531,7 +531,7 @@ void winbind_msg_offline(int msg_type, struct process_id src, /* Set our domains as online and forward the online message to our children. */ -void winbind_msg_online(int msg_type, struct process_id src, +void winbind_msg_online(int msg_type, struct server_id src, void *buf, size_t len, void *private_data) { struct winbindd_child *child; @@ -600,7 +600,7 @@ void winbind_msg_online(int msg_type, struct process_id src, } /* Forward the online/offline messages to our children. */ -void winbind_msg_onlinestatus(int msg_type, struct process_id src, +void winbind_msg_onlinestatus(int msg_type, struct server_id src, void *buf, size_t len, void *private_data) { struct winbindd_child *child; @@ -671,7 +671,7 @@ static void account_lockout_policy_handler(struct event_context *ctx, /* Deal with a request to go offline. */ -static void child_msg_offline(int msg_type, struct process_id src, +static void child_msg_offline(int msg_type, struct server_id src, void *buf, size_t len, void *private_data) { struct winbindd_domain *domain; @@ -703,7 +703,7 @@ static void child_msg_offline(int msg_type, struct process_id src, /* Deal with a request to go online. */ -static void child_msg_online(int msg_type, struct process_id src, +static void child_msg_online(int msg_type, struct server_id src, void *buf, size_t len, void *private_data) { struct winbindd_domain *domain; @@ -765,12 +765,12 @@ static const char *collect_onlinestatus(TALLOC_CTX *mem_ctx) return buf; } -static void child_msg_onlinestatus(int msg_type, struct process_id src, +static void child_msg_onlinestatus(int msg_type, struct server_id src, void *buf, size_t len, void *private_data) { TALLOC_CTX *mem_ctx; const char *message; - struct process_id *sender; + struct server_id *sender; DEBUG(5,("winbind_msg_onlinestatus received.\n")); @@ -778,7 +778,7 @@ static void child_msg_onlinestatus(int msg_type, struct process_id src, return; } - sender = (struct process_id *)buf; + sender = (struct server_id *)buf; mem_ctx = talloc_init("winbind_msg_onlinestatus"); if (mem_ctx == NULL) { diff --git a/source3/printing/printing.c b/source3/printing/printing.c index 8b61f076801..92e0ba65858 100644 --- a/source3/printing/printing.c +++ b/source3/printing/printing.c @@ -1348,7 +1348,7 @@ static void print_queue_update_with_lock( const char *sharename, /**************************************************************************** this is the receive function of the background lpq updater ****************************************************************************/ -static void print_queue_receive(int msg_type, struct process_id src, +static void print_queue_receive(int msg_type, struct server_id src, void *buf, size_t msglen, void *private_data) { diff --git a/source3/profile/profile.c b/source3/profile/profile.c index b7a2ea23beb..c4136950a5b 100644 --- a/source3/profile/profile.c +++ b/source3/profile/profile.c @@ -44,7 +44,7 @@ BOOL do_profile_times = False; /**************************************************************************** Set a profiling level. ****************************************************************************/ -void set_profile_level(int level, struct process_id src) +void set_profile_level(int level, struct server_id src) { #ifdef WITH_PROFILE switch (level) { @@ -93,7 +93,8 @@ void set_profile_level(int level, struct process_id src) /**************************************************************************** receive a set profile level message ****************************************************************************/ -void profile_message(int msg_type, struct process_id src, void *buf, size_t len, void *private_data) +void profile_message(int msg_type, struct server_id src, void *buf, size_t len, + void *private_data) { int level; @@ -104,7 +105,7 @@ void profile_message(int msg_type, struct process_id src, void *buf, size_t len, /**************************************************************************** receive a request profile level message ****************************************************************************/ -void reqprofile_message(int msg_type, struct process_id src, +void reqprofile_message(int msg_type, struct server_id src, void *buf, size_t len, void *private_data) { int level; diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c index 5a19f2de200..7e46541b942 100644 --- a/source3/rpc_server/srv_spoolss_nt.c +++ b/source3/rpc_server/srv_spoolss_nt.c @@ -1109,7 +1109,7 @@ static BOOL notify2_unpack_msg( SPOOLSS_NOTIFY_MSG *msg, struct timeval *tv, voi Receive a notify2 message list ********************************************************************/ -static void receive_notify2_message_list(int msg_type, struct process_id src, +static void receive_notify2_message_list(int msg_type, struct server_id src, void *msg, size_t len, void *private_data) { @@ -1223,7 +1223,7 @@ static BOOL srv_spoolss_drv_upgrade_printer(char* drivername) over all printers, upgrading ones as necessary **********************************************************************/ -void do_drv_upgrade_printer(int msg_type, struct process_id src, +void do_drv_upgrade_printer(int msg_type, struct server_id src, void *buf, size_t len, void *private_data) { fstring drivername; @@ -1321,7 +1321,7 @@ static BOOL srv_spoolss_reset_printerdata(char* drivername) over all printers, resetting printer data as neessary **********************************************************************/ -void reset_all_printerdata(int msg_type, struct process_id src, +void reset_all_printerdata(int msg_type, struct server_id src, void *buf, size_t len, void *private_data) { fstring drivername; diff --git a/source3/smbd/blocking.c b/source3/smbd/blocking.c index d0caa29597d..7fe9f0c3c7f 100644 --- a/source3/smbd/blocking.c +++ b/source3/smbd/blocking.c @@ -73,7 +73,7 @@ static BOOL in_chained_smb(void) return (chain_size != 0); } -static void received_unlock_msg(int msg_type, struct process_id src, +static void received_unlock_msg(int msg_type, struct server_id src, void *buf, size_t len, void *private_data); static void process_blocking_lock_queue(void); @@ -645,7 +645,7 @@ BOOL blocking_lock_was_deferred(int mid) Set a flag as an unlock request affects one of our pending locks. *****************************************************************************/ -static void received_unlock_msg(int msg_type, struct process_id src, +static void received_unlock_msg(int msg_type, struct server_id src, void *buf, size_t len, void *private_data) { @@ -807,7 +807,7 @@ static void process_blocking_lock_queue(void) #define MSG_BLOCKING_LOCK_CANCEL_SIZE (sizeof(blocking_lock_record *) + sizeof(NTSTATUS)) static void process_blocking_lock_cancel_message(int msg_type, - struct process_id src, + struct server_id src, void *buf, size_t len, void *private_data) { diff --git a/source3/smbd/conn.c b/source3/smbd/conn.c index a15684a35ba..d126bd39e62 100644 --- a/source3/smbd/conn.c +++ b/source3/smbd/conn.c @@ -319,7 +319,7 @@ the message contains just a share name and all instances of that share are unmounted the special sharename '*' forces unmount of all shares ****************************************************************************/ -void msg_force_tdis(int msg_type, struct process_id pid, void *buf, size_t len, +void msg_force_tdis(int msg_type, struct server_id pid, void *buf, size_t len, void *private_data) { connection_struct *conn, *next; diff --git a/source3/smbd/notify_internal.c b/source3/smbd/notify_internal.c index 9f23db66711..940ff8aae96 100644 --- a/source3/smbd/notify_internal.c +++ b/source3/smbd/notify_internal.c @@ -677,7 +677,7 @@ void notify_trigger(struct notify_context *notify, DEBUG(10, ("Deleting notify entries for " "process %s because it's gone\n", - procid_str_static(&e->server.id))); + procid_str_static(&e->server))); notify_remove_all(notify, &server); goto again; } diff --git a/source3/smbd/open.c b/source3/smbd/open.c index f959f00b10e..e891209d2be 100644 --- a/source3/smbd/open.c +++ b/source3/smbd/open.c @@ -2247,7 +2247,7 @@ NTSTATUS open_file_stat(connection_struct *conn, const char *fname, smbd process. ****************************************************************************/ -void msg_file_was_renamed(int msg_type, struct process_id src, +void msg_file_was_renamed(int msg_type, struct server_id src, void *buf, size_t len, void *private_data) { files_struct *fsp; diff --git a/source3/smbd/oplock.c b/source3/smbd/oplock.c index 26ee52b797c..8a843318105 100644 --- a/source3/smbd/oplock.c +++ b/source3/smbd/oplock.c @@ -391,7 +391,7 @@ static void add_oplock_timeout_handler(files_struct *fsp) the client for LEVEL2. *******************************************************************/ -static void process_oplock_async_level2_break_message(int msg_type, struct process_id src, +static void process_oplock_async_level2_break_message(int msg_type, struct server_id src, void *buf, size_t len, void *private_data) { @@ -478,7 +478,7 @@ static void process_oplock_async_level2_break_message(int msg_type, struct proce This handles the generic oplock break message from another smbd. *******************************************************************/ -static void process_oplock_break_message(int msg_type, struct process_id src, +static void process_oplock_break_message(int msg_type, struct server_id src, void *buf, size_t len, void *private_data) { @@ -587,7 +587,7 @@ static void process_oplock_break_message(int msg_type, struct process_id src, This handles the kernel oplock break message. *******************************************************************/ -static void process_kernel_oplock_break(int msg_type, struct process_id src, +static void process_kernel_oplock_break(int msg_type, struct server_id src, void *buf, size_t len, void *private_data) { @@ -679,7 +679,7 @@ void reply_to_oplock_break_requests(files_struct *fsp) return; } -static void process_oplock_break_response(int msg_type, struct process_id src, +static void process_oplock_break_response(int msg_type, struct server_id src, void *buf, size_t len, void *private_data) { @@ -707,7 +707,7 @@ static void process_oplock_break_response(int msg_type, struct process_id src, schedule_deferred_open_smb_message(msg.op_mid); } -static void process_open_retry_message(int msg_type, struct process_id src, +static void process_open_retry_message(int msg_type, struct server_id src, void *buf, size_t len, void *private_data) { diff --git a/source3/smbd/pipes.c b/source3/smbd/pipes.c index bec2f19f86b..aba2fe69c59 100644 --- a/source3/smbd/pipes.c +++ b/source3/smbd/pipes.c @@ -37,7 +37,7 @@ #define PIPEDB_KEY_FORMAT "PIPE/%s/%u/%d" struct pipe_dbrec { - struct process_id pid; + struct server_id pid; int pnum; uid_t uid; diff --git a/source3/smbd/server.c b/source3/smbd/server.c index 3422290a90f..1020ad3aca5 100644 --- a/source3/smbd/server.c +++ b/source3/smbd/server.c @@ -87,7 +87,7 @@ struct messaging_context *smbd_messaging_context(void) What to do when smb.conf is updated. ********************************************************************/ -static void smb_conf_updated(int msg_type, struct process_id src, +static void smb_conf_updated(int msg_type, struct server_id src, void *buf, size_t len, void *private_data) { DEBUG(10,("smb_conf_updated: Got message saying smb.conf was updated. Reloading.\n")); @@ -99,7 +99,7 @@ static void smb_conf_updated(int msg_type, struct process_id src, Delete a statcache entry. ********************************************************************/ -static void smb_stat_cache_delete(int msg_type, struct process_id src, +static void smb_stat_cache_delete(int msg_type, struct server_id src, void *buf, size_t len, void *private_data) { const char *name = (const char *)buf; @@ -150,7 +150,7 @@ static void killkids(void) somewhere else. ****************************************************************************/ -static void msg_sam_sync(int UNUSED(msg_type), struct process_id UNUSED(pid), +static void msg_sam_sync(int UNUSED(msg_type), struct server_id UNUSED(pid), void *UNUSED(buf), size_t UNUSED(len), void *private_data) { @@ -162,7 +162,7 @@ static void msg_sam_sync(int UNUSED(msg_type), struct process_id UNUSED(pid), somewhere else. ****************************************************************************/ -static void msg_sam_repl(int msg_type, struct process_id pid, +static void msg_sam_repl(int msg_type, struct server_id pid, void *buf, size_t len, void *private_data) { uint32 low_serial; @@ -196,7 +196,7 @@ static BOOL open_sockets_inetd(void) return True; } -static void msg_exit_server(int msg_type, struct process_id src, +static void msg_exit_server(int msg_type, struct server_id src, void *buf, size_t len, void *private_data) { DEBUG(3, ("got a SHUTDOWN message\n")); @@ -204,7 +204,7 @@ static void msg_exit_server(int msg_type, struct process_id src, } #ifdef DEVELOPER -static void msg_inject_fault(int msg_type, struct process_id src, +static void msg_inject_fault(int msg_type, struct server_id src, void *buf, size_t len, void *private_data) { int sig; @@ -921,7 +921,7 @@ extern void build_options(BOOL screen); } if (profile_level != NULL) { int pl = atoi(profile_level); - struct process_id src; + struct server_id src; DEBUG(1, ("setting profiling level: %s\n",profile_level)); src.pid = getpid(); diff --git a/source3/torture/locktest.c b/source3/torture/locktest.c index d248a9459db..792ada61a96 100644 --- a/source3/torture/locktest.c +++ b/source3/torture/locktest.c @@ -118,7 +118,7 @@ static struct record *recorded; static void print_brl(SMB_DEV_T dev, SMB_INO_T ino, - struct process_id pid, + struct server_id pid, enum brl_type lock_type, enum brl_flavour lock_flav, br_off start, diff --git a/source3/torture/locktest2.c b/source3/torture/locktest2.c index 0a897fb2065..71534010228 100644 --- a/source3/torture/locktest2.c +++ b/source3/torture/locktest2.c @@ -136,7 +136,7 @@ static BOOL try_unlock(struct cli_state *c, int fstype, return False; } -static void print_brl(SMB_DEV_T dev, SMB_INO_T ino, struct process_id pid, +static void print_brl(SMB_DEV_T dev, SMB_INO_T ino, struct server_id pid, enum brl_type lock_type, enum brl_flavour lock_flav, br_off start, br_off size) diff --git a/source3/torture/msgtest.c b/source3/torture/msgtest.c index 5a066bc599e..703832c7b4a 100644 --- a/source3/torture/msgtest.c +++ b/source3/torture/msgtest.c @@ -29,7 +29,7 @@ static int pong_count; /**************************************************************************** a useful function for testing the message system ****************************************************************************/ -static void pong_message(int msg_type, struct process_id src, +static void pong_message(int msg_type, struct server_id src, void *buf, size_t len, void *private_data) { pong_count++; diff --git a/source3/utils/net_ads.c b/source3/utils/net_ads.c index 385d9c1aa51..a9319a380cc 100644 --- a/source3/utils/net_ads.c +++ b/source3/utils/net_ads.c @@ -1921,7 +1921,7 @@ static int net_ads_printer_info(int argc, const char **argv) return 0; } -void do_drv_upgrade_printer(int msg_type, struct process_id src, +void do_drv_upgrade_printer(int msg_type, struct server_id src, void *buf, size_t len, void *private_data) { return; diff --git a/source3/utils/net_status.c b/source3/utils/net_status.c index 354111f6092..72ea645896a 100644 --- a/source3/utils/net_status.c +++ b/source3/utils/net_status.c @@ -160,7 +160,7 @@ static int show_share_parseable(TDB_CONTEXT *tdb, TDB_DATA kbuf, TDB_DATA dbuf, } for (i=0; i<ids->num_entries; i++) { - struct process_id id = pid_to_procid(ids->entries[i].pid); + struct server_id id = pid_to_procid(ids->entries[i].pid); if (procid_equal(&id, &crec.pid)) { guest = False; break; diff --git a/source3/utils/smbcontrol.c b/source3/utils/smbcontrol.c index b08a059d02e..d9eb5b78eaa 100644 --- a/source3/utils/smbcontrol.c +++ b/source3/utils/smbcontrol.c @@ -47,7 +47,7 @@ static int num_replies; /* Used by message callback fns */ /* Send a message to a destination pid. Zero means broadcast smbd. */ -static BOOL send_message(struct process_id pid, int msg_type, +static BOOL send_message(struct server_id pid, int msg_type, const void *buf, int len, BOOL duplicates) { @@ -99,7 +99,7 @@ static void wait_replies(BOOL multiple_replies) /* Message handler callback that displays the PID and a string on stdout */ -static void print_pid_string_cb(int msg_type, struct process_id pid, void *buf, +static void print_pid_string_cb(int msg_type, struct server_id pid, void *buf, size_t len, void *private_data) { printf("PID %u: %.*s", (unsigned int)procid_to_pid(&pid), @@ -109,7 +109,7 @@ static void print_pid_string_cb(int msg_type, struct process_id pid, void *buf, /* Message handler callback that displays a string on stdout */ -static void print_string_cb(int msg_type, struct process_id pid, +static void print_string_cb(int msg_type, struct server_id pid, void *buf, size_t len, void *private_data) { printf("%.*s", (int)len, (const char *)buf); @@ -118,7 +118,7 @@ static void print_string_cb(int msg_type, struct process_id pid, /* Send no message. Useful for testing. */ -static BOOL do_noop(const struct process_id pid, +static BOOL do_noop(const struct server_id pid, const int argc, const char **argv) { if (argc != 1) { @@ -133,7 +133,7 @@ static BOOL do_noop(const struct process_id pid, /* Send a debug string */ -static BOOL do_debug(const struct process_id pid, +static BOOL do_debug(const struct server_id pid, const int argc, const char **argv) { if (argc != 2) { @@ -261,7 +261,7 @@ static int stack_trace_connection(TDB_CONTEXT * tdb, TDB_DATA key, return 0; } -static BOOL do_daemon_stack_trace(const struct process_id pid, +static BOOL do_daemon_stack_trace(const struct server_id pid, const int argc, const char **argv) { fprintf(stderr, @@ -306,7 +306,7 @@ static BOOL do_daemon_stack_trace(const struct process_id pid, #else /* defined(HAVE_LIBUNWIND_PTRACE) && defined(HAVE_LINUX_PTRACE) */ -static BOOL do_daemon_stack_trace(const struct process_id pid, +static BOOL do_daemon_stack_trace(const struct server_id pid, const int argc, const char **argv) { fprintf(stderr, @@ -318,7 +318,7 @@ static BOOL do_daemon_stack_trace(const struct process_id pid, /* Inject a fault (fatal signal) into a running smbd */ -static BOOL do_inject_fault(const struct process_id pid, +static BOOL do_inject_fault(const struct server_id pid, const int argc, const char **argv) { if (argc != 2) { @@ -359,7 +359,7 @@ static BOOL do_inject_fault(const struct process_id pid, /* Force a browser election */ -static BOOL do_election(const struct process_id pid, +static BOOL do_election(const struct server_id pid, const int argc, const char **argv) { if (argc != 1) { @@ -373,7 +373,7 @@ static BOOL do_election(const struct process_id pid, /* Ping a samba daemon process */ -static void pong_cb(int msg_type, struct process_id pid, void *buf, +static void pong_cb(int msg_type, struct server_id pid, void *buf, size_t len, void *private_data) { char *src_string = procid_str(NULL, &pid); @@ -382,7 +382,7 @@ static void pong_cb(int msg_type, struct process_id pid, void *buf, num_replies++; } -static BOOL do_ping(const struct process_id pid, const int argc, const char **argv) +static BOOL do_ping(const struct server_id pid, const int argc, const char **argv) { if (argc != 1) { fprintf(stderr, "Usage: smbcontrol <dest> ping\n"); @@ -410,7 +410,7 @@ static BOOL do_ping(const struct process_id pid, const int argc, const char **ar /* Set profiling options */ -static BOOL do_profile(const struct process_id pid, +static BOOL do_profile(const struct server_id pid, const int argc, const char **argv) { int v; @@ -439,7 +439,7 @@ static BOOL do_profile(const struct process_id pid, /* Return the profiling level */ -static void profilelevel_cb(int msg_type, struct process_id pid, void *buf, +static void profilelevel_cb(int msg_type, struct server_id pid, void *buf, size_t len, void *private_data) { int level; @@ -476,7 +476,7 @@ static void profilelevel_cb(int msg_type, struct process_id pid, void *buf, printf("Profiling %s on pid %u\n",s,(unsigned int)procid_to_pid(&pid)); } -static void profilelevel_rqst(int msg_type, struct process_id pid, +static void profilelevel_rqst(int msg_type, struct server_id pid, void *buf, size_t len, void *private_data) { int v = 0; @@ -486,7 +486,7 @@ static void profilelevel_rqst(int msg_type, struct process_id pid, send_message(pid, MSG_PROFILELEVEL, &v, sizeof(int), False); } -static BOOL do_profilelevel(const struct process_id pid, +static BOOL do_profilelevel(const struct server_id pid, const int argc, const char **argv) { if (argc != 1) { @@ -516,7 +516,7 @@ static BOOL do_profilelevel(const struct process_id pid, /* Display debug level settings */ -static BOOL do_debuglevel(const struct process_id pid, +static BOOL do_debuglevel(const struct server_id pid, const int argc, const char **argv) { if (argc != 1) { @@ -545,7 +545,7 @@ static BOOL do_debuglevel(const struct process_id pid, /* Send a print notify message */ -static BOOL do_printnotify(const struct process_id pid, +static BOOL do_printnotify(const struct server_id pid, const int argc, const char **argv) { const char *cmd; @@ -685,7 +685,7 @@ send: /* Close a share */ -static BOOL do_closeshare(const struct process_id pid, +static BOOL do_closeshare(const struct server_id pid, const int argc, const char **argv) { if (argc != 2) { @@ -700,7 +700,7 @@ static BOOL do_closeshare(const struct process_id pid, /* Force a SAM synchronisation */ -static BOOL do_samsync(const struct process_id pid, +static BOOL do_samsync(const struct server_id pid, const int argc, const char **argv) { if (argc != 1) { @@ -714,7 +714,7 @@ static BOOL do_samsync(const struct process_id pid, /* Force a SAM replication */ -static BOOL do_samrepl(const struct process_id pid, +static BOOL do_samrepl(const struct server_id pid, const int argc, const char **argv) { if (argc != 1) { @@ -728,7 +728,7 @@ static BOOL do_samrepl(const struct process_id pid, /* Display talloc pool usage */ -static BOOL do_poolusage(const struct process_id pid, +static BOOL do_poolusage(const struct server_id pid, const int argc, const char **argv) { if (argc != 1) { @@ -757,7 +757,7 @@ static BOOL do_poolusage(const struct process_id pid, /* Perform a dmalloc mark */ -static BOOL do_dmalloc_mark(const struct process_id pid, +static BOOL do_dmalloc_mark(const struct server_id pid, const int argc, const char **argv) { if (argc != 1) { @@ -771,7 +771,7 @@ static BOOL do_dmalloc_mark(const struct process_id pid, /* Perform a dmalloc changed */ -static BOOL do_dmalloc_changed(const struct process_id pid, +static BOOL do_dmalloc_changed(const struct server_id pid, const int argc, const char **argv) { if (argc != 1) { @@ -786,7 +786,7 @@ static BOOL do_dmalloc_changed(const struct process_id pid, /* Shutdown a server process */ -static BOOL do_shutdown(const struct process_id pid, +static BOOL do_shutdown(const struct server_id pid, const int argc, const char **argv) { if (argc != 1) { @@ -799,7 +799,7 @@ static BOOL do_shutdown(const struct process_id pid, /* Notify a driver upgrade */ -static BOOL do_drvupgrade(const struct process_id pid, +static BOOL do_drvupgrade(const struct server_id pid, const int argc, const char **argv) { if (argc != 2) { @@ -812,7 +812,7 @@ static BOOL do_drvupgrade(const struct process_id pid, pid, MSG_DEBUG, argv[1], strlen(argv[1]) + 1, False); } -static BOOL do_winbind_online(const struct process_id pid, +static BOOL do_winbind_online(const struct server_id pid, const int argc, const char **argv) { TDB_CONTEXT *tdb; @@ -845,7 +845,7 @@ static BOOL do_winbind_online(const struct process_id pid, return send_message(pid, MSG_WINBIND_ONLINE, NULL, 0, False); } -static BOOL do_winbind_offline(const struct process_id pid, +static BOOL do_winbind_offline(const struct server_id pid, const int argc, const char **argv) { TDB_CONTEXT *tdb; @@ -915,10 +915,10 @@ static BOOL do_winbind_offline(const struct process_id pid, return ret; } -static BOOL do_winbind_onlinestatus(const struct process_id pid, +static BOOL do_winbind_onlinestatus(const struct server_id pid, const int argc, const char **argv) { - struct process_id myid; + struct server_id myid; myid = pid_to_procid(sys_getpid()); @@ -945,7 +945,7 @@ static BOOL do_winbind_onlinestatus(const struct process_id pid, } -static BOOL do_reload_config(const struct process_id pid, +static BOOL do_reload_config(const struct server_id pid, const int argc, const char **argv) { if (argc != 1) { @@ -967,7 +967,7 @@ static void my_make_nmb_name( struct nmb_name *n, const char *name, int type) push_ascii(n->scope, global_scope(), 64, STR_TERMINATE); } -static BOOL do_nodestatus(const struct process_id pid, +static BOOL do_nodestatus(const struct server_id pid, const int argc, const char **argv) { struct packet_struct p; @@ -1007,7 +1007,7 @@ static BOOL do_nodestatus(const struct process_id pid, static const struct { const char *name; /* Option name */ - BOOL (*fn)(const struct process_id pid, + BOOL (*fn)(const struct server_id pid, const int argc, const char **argv); const char *help; /* Short help text */ } msg_types[] = { @@ -1066,9 +1066,9 @@ static void usage(poptContext *pc) /* Return the pid number for a string destination */ -static struct process_id parse_dest(const char *dest) +static struct server_id parse_dest(const char *dest) { - struct process_id result = {-1}; + struct server_id result = {-1}; pid_t pid; /* Zero is a special return value for broadcast smbd */ @@ -1116,7 +1116,7 @@ static struct process_id parse_dest(const char *dest) static BOOL do_command(int argc, const char **argv) { const char *dest = argv[0], *command = argv[1]; - struct process_id pid; + struct server_id pid; int i; /* Check destination */ diff --git a/source3/utils/status.c b/source3/utils/status.c index df742f73e79..944158567ab 100644 --- a/source3/utils/status.c +++ b/source3/utils/status.c @@ -168,7 +168,7 @@ static void print_share_mode(const struct share_mode_entry *e, static void print_brl(SMB_DEV_T dev, SMB_INO_T ino, - struct process_id pid, + struct server_id pid, enum brl_type lock_type, enum brl_flavour lock_flav, br_off start, diff --git a/source3/web/startstop.c b/source3/web/startstop.c index 44945cd5362..1485516474c 100644 --- a/source3/web/startstop.c +++ b/source3/web/startstop.c @@ -121,7 +121,7 @@ void stop_winbindd(void) } #endif /* kill a specified process */ -void kill_pid(struct process_id pid) +void kill_pid(struct server_id pid) { if (geteuid() != 0) return; diff --git a/source3/web/statuspage.c b/source3/web/statuspage.c index e4d726c4fd2..7b5c528a7de 100644 --- a/source3/web/statuspage.c +++ b/source3/web/statuspage.c @@ -28,14 +28,14 @@ PIDMAP { PIDMAP *next, *prev; - struct process_id pid; + struct server_id pid; char *machine; }; static PIDMAP *pidmap; static int PID_or_Machine; /* 0 = show PID, else show Machine name */ -static struct process_id smbd_pid; +static struct server_id smbd_pid; /* from 2nd call on, remove old list */ static void initPid2Machine (void) @@ -55,7 +55,7 @@ static void initPid2Machine (void) } /* add new PID <-> Machine name mapping */ -static void addPid2Machine (struct process_id pid, char *machine) +static void addPid2Machine (struct server_id pid, char *machine) { /* show machine name rather PID on table "Open Files"? */ if (PID_or_Machine) { @@ -75,7 +75,7 @@ static void addPid2Machine (struct process_id pid, char *machine) } /* lookup PID <-> Machine name mapping */ -static char *mapPid2Machine (struct process_id pid) +static char *mapPid2Machine (struct server_id pid) { static char pidbuf [64]; PIDMAP *map; |