summaryrefslogtreecommitdiff
path: root/source3/nmbd
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2005-09-30 17:13:37 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:04:48 -0500
commit54abd2aa66069e6baf7769c496f46d9dba18db39 (patch)
tree9cf8e88168011797319ba9e9866749201b1eac1e /source3/nmbd
parent4a2cc231d22a82ed21771a72508f15d21ed63227 (diff)
downloadsamba-54abd2aa66069e6baf7769c496f46d9dba18db39.tar.gz
samba-54abd2aa66069e6baf7769c496f46d9dba18db39.tar.bz2
samba-54abd2aa66069e6baf7769c496f46d9dba18db39.zip
r10656: BIG merge from trunk. Features not copied over
* \PIPE\unixinfo * winbindd's {group,alias}membership new functions * winbindd's lookupsids() functionality * swat (trunk changes to be reverted as per discussion with Deryck) (This used to be commit 939c3cb5d78e3a2236209b296aa8aba8bdce32d3)
Diffstat (limited to 'source3/nmbd')
-rw-r--r--source3/nmbd/asyncdns.c2
-rw-r--r--source3/nmbd/nmbd.c21
-rw-r--r--source3/nmbd/nmbd_elections.c3
-rw-r--r--source3/nmbd/nmbd_packets.c4
-rw-r--r--source3/nmbd/nmbd_synclists.c2
-rw-r--r--source3/nmbd/nmbd_winsserver.c3
6 files changed, 21 insertions, 14 deletions
diff --git a/source3/nmbd/asyncdns.c b/source3/nmbd/asyncdns.c
index 653cb97fbb..4db54ea198 100644
--- a/source3/nmbd/asyncdns.c
+++ b/source3/nmbd/asyncdns.c
@@ -201,7 +201,7 @@ void run_dns_queue(void)
/* Allow SIGTERM to kill us. */
BlockSignals(False, SIGTERM);
- if (!process_exists(child_pid)) {
+ if (!process_exists_by_pid(child_pid)) {
close(fd_in);
start_async_dns();
}
diff --git a/source3/nmbd/nmbd.c b/source3/nmbd/nmbd.c
index bc58dd3a28..fcaba03b3d 100644
--- a/source3/nmbd/nmbd.c
+++ b/source3/nmbd/nmbd.c
@@ -76,7 +76,8 @@ static void terminate(void)
Handle a SHUTDOWN message from smbcontrol.
**************************************************************************** */
-static void nmbd_terminate(int msg_type, pid_t src, void *buf, size_t len)
+static void nmbd_terminate(int msg_type, struct process_id src,
+ void *buf, size_t len)
{
terminate();
}
@@ -307,7 +308,8 @@ static BOOL reload_nmbd_services(BOOL test)
* detects that there are no subnets.
**************************************************************************** */
-static void msg_reload_nmbd_services(int msg_type, pid_t src, void *buf, size_t len)
+static void msg_reload_nmbd_services(int msg_type, struct process_id src,
+ void *buf, size_t len)
{
write_browse_list( 0, True );
dump_all_namelists();
@@ -323,31 +325,33 @@ static void msg_reload_nmbd_services(int msg_type, pid_t src, void *buf, size_t
}
}
-static void msg_nmbd_send_packet(int msg_type, pid_t src,
+static void msg_nmbd_send_packet(int msg_type, struct process_id src,
void *buf, size_t len)
{
struct packet_struct *p = (struct packet_struct *)buf;
struct subnet_record *subrec;
struct in_addr *local_ip;
- DEBUG(10, ("Received send_packet from %d\n", src));
+ DEBUG(10, ("Received send_packet from %d\n", procid_to_pid(&src)));
if (len != sizeof(struct packet_struct)) {
- DEBUG(2, ("Discarding invalid packet length from %d\n", src));
+ DEBUG(2, ("Discarding invalid packet length from %d\n",
+ procid_to_pid(&src)));
return;
}
if ((p->packet_type != NMB_PACKET) &&
(p->packet_type != DGRAM_PACKET)) {
DEBUG(2, ("Discarding invalid packet type from %d: %d\n",
- src, p->packet_type));
+ procid_to_pid(&src), p->packet_type));
return;
}
local_ip = iface_ip(p->ip);
if (local_ip == NULL) {
- DEBUG(2, ("Could not find ip for packet from %d\n", src));
+ DEBUG(2, ("Could not find ip for packet from %d\n",
+ procid_to_pid(&src)));
return;
}
@@ -590,7 +594,8 @@ static void process(void)
if(reload_after_sighup) {
DEBUG( 0, ( "Got SIGHUP dumping debug info.\n" ) );
- msg_reload_nmbd_services(MSG_SMB_CONF_UPDATED, (pid_t) 0, (void*) &no_subnets, 0);
+ msg_reload_nmbd_services(MSG_SMB_CONF_UPDATED,
+ pid_to_procid(0), (void*) &no_subnets, 0);
if(no_subnets)
return;
reload_after_sighup = 0;
diff --git a/source3/nmbd/nmbd_elections.c b/source3/nmbd/nmbd_elections.c
index 470cf4277b..6e8e8429be 100644
--- a/source3/nmbd/nmbd_elections.c
+++ b/source3/nmbd/nmbd_elections.c
@@ -374,7 +374,8 @@ 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, pid_t src, void *buf, size_t len)
+void nmbd_message_election(int msg_type, struct process_id src,
+ void *buf, size_t len)
{
struct subnet_record *subrec;
diff --git a/source3/nmbd/nmbd_packets.c b/source3/nmbd/nmbd_packets.c
index 4baf2d3d6c..c25473c4fb 100644
--- a/source3/nmbd/nmbd_packets.c
+++ b/source3/nmbd/nmbd_packets.c
@@ -1246,7 +1246,7 @@ packet sent to name %s from IP %s\n",
packet sent to name %s from IP %s\n",
dgram->datasize,
len,
- PTR_DIFF(buf2, dgram->data),
+ (int)PTR_DIFF(buf2, dgram->data),
nmb_namestr(&dgram->dest_name),
inet_ntoa(p->ip) ));
return;
@@ -1257,7 +1257,7 @@ packet sent to name %s from IP %s\n",
packet sent to name %s from IP %s\n",
dgram->datasize,
len,
- PTR_DIFF(buf2, dgram->data),
+ (int)PTR_DIFF(buf2, dgram->data),
nmb_namestr(&dgram->dest_name),
inet_ntoa(p->ip) ));
return;
diff --git a/source3/nmbd/nmbd_synclists.c b/source3/nmbd/nmbd_synclists.c
index 33690133bf..28ad92ed10 100644
--- a/source3/nmbd/nmbd_synclists.c
+++ b/source3/nmbd/nmbd_synclists.c
@@ -294,7 +294,7 @@ void sync_check_completion(void)
for (s=syncs;s;s=next) {
next = s->next;
- if (!process_exists(s->pid)) {
+ if (!process_exists_by_pid(s->pid)) {
/* it has completed - grab the info */
complete_sync(s);
DLIST_REMOVE(syncs, s);
diff --git a/source3/nmbd/nmbd_winsserver.c b/source3/nmbd/nmbd_winsserver.c
index 86f5b9c426..d76cb8f032 100644
--- a/source3/nmbd/nmbd_winsserver.c
+++ b/source3/nmbd/nmbd_winsserver.c
@@ -1874,7 +1874,8 @@ void wins_write_database(BOOL background)
Process a internal Samba message receiving a wins record.
***************************************************************************/
-void nmbd_wins_new_entry(int msg_type, pid_t src, void *buf, size_t len)
+void nmbd_wins_new_entry(int msg_type, struct process_id src,
+ void *buf, size_t len)
{
WINS_RECORD *record;
struct name_record *namerec = NULL;