Debian bug report logs - #1660 , boring messages ----------------------------------------------------------------------- Message sent to debian-devel@pixar.com: Subject: Bug#1660: ping doesn't work with broadcast addresses Reply-To: Marek Michalkiewicz , debian-bugs@pixar.com Resent-From: Marek Michalkiewicz Resent-To: debian-devel@pixar.com Resent-Date: Thu, 12 Oct 1995 21:03:04 GMT Resent-Message-ID: Resent-Sender: iwj10@cus.cam.ac.uk X-Debian-PR-Package: netbase X-Debian-PR-Keywords: Received: via spool for debian-bugs; Thu, 12 Oct 1995 21:03:04 GMT Received: with rfc822 via encapsulated-mail; Thu, 12 Oct 1995 21:00:38 GMT Received: from pixar.com by mongo.pixar.com with smtp (Smail3.1.28.1 #15) id m0t3UhM-000B6jC; Thu, 12 Oct 95 13:57 PDT Received: from i17linuxb.ists.pwr.wroc.pl by pixar.com with SMTP id AA02247 (5.67b/IDA-1.5 for debian-bugs-pipe@mongo.pixar.com); Thu, 12 Oct 1995 13:57:25 -0700 Received: (from marekm@localhost) by i17linuxb.ists.pwr.wroc.pl (8.6.12/8.6.9) id VAA32259 for debian-bugs@pixar.com; Thu, 12 Oct 1995 21:57:41 +0100 From: Marek Michalkiewicz Message-Id: <199510122057.VAA32259@i17linuxb.ists.pwr.wroc.pl> To: debian-bugs@pixar.com Date: Thu, 12 Oct 1995 21:57:39 +0100 (MET) X-Mailer: ELM [version 2.4 PL23] Content-Type: text Content-Length: 1389 Package: netbase Version: 1.17-1 On several other systems I can use ping with a broadcast address to see what machines on the local network are up and running. This doesn't work on Linux - I get "sendto: Permission denied". It is necessary to set the SO_BROADCAST socket option for this to work. Similar change would probably be nice for fping too. While we are at it, can we make ping, traceroute (and maybe some other setuid programs which can run for a long time and need root privileges only at startup), drop root privileges when no longer needed? Just do setuid(getuid()) - the advantage is that ps shows who is running ping. The patch for ping, with both of the above changes, follows. Marek diff -urN ping-5.9.orig/ping.c ping-5.9/ping.c --- ping-5.9.orig/ping.c Sat Jan 14 01:24:01 1995 +++ ping-5.9/ping.c Sat Oct 7 01:12:08 1995 @@ -333,6 +333,8 @@ if (options & F_SO_DONTROUTE) (void)setsockopt(s, SOL_SOCKET, SO_DONTROUTE, (char *)&hold, sizeof(hold)); + /* this is necessary for broadcast addresses to work */ + setsockopt(s, SOL_SOCKET, SO_BROADCAST, (char *)&hold, sizeof(hold)); /* record route option */ if (options & F_RROUTE) { @@ -385,6 +387,8 @@ } } #endif + /* just in case, and to make ps show who is running ping */ + setuid(getuid()); if (to->sin_family == AF_INET) (void)printf("PING %s (%s): %d data bytes\n", hostname, ----------------------------------------------------------------------- Message sent: From: iwj10@thor.cam.ac.uk (Ian Jackson) To: Marek Michalkiewicz Subject: Bug#1660: Acknowledgement (was: ping doesn't work with broadcast addresses) In-Reply-To: <199510122057.VAA32259@i17linuxb.ists.pwr.wroc.pl> References: <199510122057.VAA32259@i17linuxb.ists.pwr.wroc.pl> Thank you for the problem report you have sent regarding Debian GNU/Linux. This is an automatically generated reply, to let you know your message has been received. It is being forwarded to the developers' mailing list for their attention; they will reply in due course. If you wish to submit further information on your problem, please send it to debian-bugs@pixar.com, but please ensure that the Subject line of your message starts with "Bug#1660" or "Re: Bug#1660" so that we can identify it as relating to the same problem. Please do not reply to the address at the top of this message, unless you wish to report a problem with the bug-tracking system. Ian Jackson (maintainer, debian-bugs) ----------------------------------------------------------------------- Message sent: From: iwj10@thor.cam.ac.uk (Ian Jackson) To: tobias@et-inf.fho-emden.de In-Reply-To: <9510172300.AA26940@server.et-inf.fho-emden.de> References: <9510172300.AA26940@server.et-inf.fho-emden.de> <199510122057.VAA32259@i17linuxb.ists.pwr.wroc.pl> Subject: Bug#1660: marked as done (was: ping doesn't work with broadcast addresses) Your message dated Wed, 18 Oct 1995 00:00:26 +0100 (MET) with message-id <9510172300.AA26940@server.et-inf.fho-emden.de> and subject line Bug#1660: ping doesn't work with broadcast addresses has caused the attached bug report to be marked as done. It is your now responsibility to ensure that the bug report is dealt with. (NB: If you are a system administrator and have no idea what I'm talking about this indicates a serious mail system misconfiguration somewhere. Please contact me immediately.) Ian Jackson (maintainer, debian-bugs) Received: with rfc822 via encapsulated-mail; Thu, 12 Oct 1995 21:00:38 GMT From i17linuxb.ists.pwr.wroc.pl!marekm Thu Oct 12 13:57:52 1995 Return-Path: Received: from pixar.com by mongo.pixar.com with smtp (Smail3.1.28.1 #15) id m0t3UhM-000B6jC; Thu, 12 Oct 95 13:57 PDT Received: from i17linuxb.ists.pwr.wroc.pl by pixar.com with SMTP id AA02247 (5.67b/IDA-1.5 for debian-bugs-pipe@mongo.pixar.com); Thu, 12 Oct 1995 13:57:25 -0700 Received: (from marekm@localhost) by i17linuxb.ists.pwr.wroc.pl (8.6.12/8.6.9) id VAA32259 for debian-bugs@pixar.com; Thu, 12 Oct 1995 21:57:41 +0100 From: Marek Michalkiewicz Message-Id: <199510122057.VAA32259@i17linuxb.ists.pwr.wroc.pl> Subject: ping doesn't work with broadcast addresses To: debian-bugs@pixar.com Date: Thu, 12 Oct 1995 21:57:39 +0100 (MET) X-Mailer: ELM [version 2.4 PL23] Content-Type: text Content-Length: 1389 Package: netbase Version: 1.17-1 On several other systems I can use ping with a broadcast address to see what machines on the local network are up and running. This doesn't work on Linux - I get "sendto: Permission denied". It is necessary to set the SO_BROADCAST socket option for this to work. Similar change would probably be nice for fping too. While we are at it, can we make ping, traceroute (and maybe some other setuid programs which can run for a long time and need root privileges only at startup), drop root privileges when no longer needed? Just do setuid(getuid()) - the advantage is that ps shows who is running ping. The patch for ping, with both of the above changes, follows. Marek diff -urN ping-5.9.orig/ping.c ping-5.9/ping.c --- ping-5.9.orig/ping.c Sat Jan 14 01:24:01 1995 +++ ping-5.9/ping.c Sat Oct 7 01:12:08 1995 @@ -333,6 +333,8 @@ if (options & F_SO_DONTROUTE) (void)setsockopt(s, SOL_SOCKET, SO_DONTROUTE, (char *)&hold, sizeof(hold)); + /* this is necessary for broadcast addresses to work */ + setsockopt(s, SOL_SOCKET, SO_BROADCAST, (char *)&hold, sizeof(hold)); /* record route option */ if (options & F_RROUTE) { @@ -385,6 +387,8 @@ } } #endif + /* just in case, and to make ps show who is running ping */ + setuid(getuid()); if (to->sin_family == AF_INET) (void)printf("PING %s (%s): %d data bytes\n", hostname, ----------------------------------------------------------------------- Message sent: From: iwj10@thor.cam.ac.uk (Ian Jackson) To: Marek Michalkiewicz Subject: Bug#1660 acknowledged by developer (was: ping doesn't work with broadcast addresses) References: <9510172300.AA26940@server.et-inf.fho-emden.de> <199510122057.VAA32259@i17linuxb.ists.pwr.wroc.pl> In-Reply-To: <199510122057.VAA32259@i17linuxb.ists.pwr.wroc.pl> This is an automatic notification regarding your bug report. Responsibility for it has been taken by one of the developers, namely "Peter Tobias" (reply to tobias@et-inf.fho-emden.de). You should be hearing from them with a substantive response shortly, if you have not already done so. If not, please contact them directly, or email debian-bugs@pixar.com or myself. Ian Jackson (maintainer, debian-bugs) ----------------------------------------------------------------------- Ian Jackson / iwj10@thor.cam.ac.uk , with the debian-bugs tracking mechanism This page last modified 07:43:01 GMT Wed 01 Nov