This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Inetutils ".
The branch, master has been updated
via 0d81d7e7e886f7e788ea7191418f8327416ef246 (commit)
from 8646d96518913a67bdd6704b86a013de81788474 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit/inetutils.git/commit/?id=0d81d7e7e886f7e788ea7191418f8327416ef246
commit 0d81d7e7e886f7e788ea7191418f8327416ef246
Author: Mats Erik Andersson <[email protected]>
Date: Fri Oct 1 17:07:49 2010 +0200
ping/ping6: Missing header and better error detection.
Signed-off-by: Simon Josefsson <[email protected]>
diff --git a/ChangeLog b/ChangeLog
index 657874c..8544e22 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2010-09-18 Mats Erik Andersson <[email protected]>
+
+ * ping/ping6.c: Include <sys/uio.h> for knowing "struct iov" in BSD.
+ * ping/ping6.c (ping_init): Check for EACCES failure from socket(2).
+ * ping/libping.c (ping_init): Likewise.
+
2010-09-23 Mats Erik Andersson <[email protected]>
* ifconfig/system/linux.c (linux_if_nameindex): Express the exact
diff --git a/ping/libping.c b/ping/libping.c
index a83def5..52590ba 100644
--- a/ping/libping.c
+++ b/ping/libping.c
@@ -62,7 +62,7 @@ ping_init (int type, int ident)
fd = socket (AF_INET, SOCK_RAW, proto->p_proto);
if (fd < 0)
{
- if (errno == EPERM)
+ if (errno == EPERM || errno == EACCES)
fprintf (stderr, "ping: ping must run as root\n");
return NULL;
}
diff --git a/ping/ping6.c b/ping/ping6.c
index e44cdb6..03a9f87 100644
--- a/ping/ping6.c
+++ b/ping/ping6.c
@@ -21,6 +21,7 @@
#include <sys/socket.h>
#include <sys/time.h>
+#include <sys/uio.h>
#include <signal.h>
#include <netinet/in.h>
@@ -704,7 +705,7 @@ ping_init (int type, int ident)
fd = socket (PF_INET6, SOCK_RAW, IPPROTO_ICMPV6);
if (fd < 0)
{
- if (errno == EPERM)
+ if (errno == EPERM || errno == EACCES)
error (EXIT_FAILURE, errno, NULL);
return NULL;
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 6 ++++++
ping/libping.c | 2 +-
ping/ping6.c | 3 ++-
3 files changed, 9 insertions(+), 2 deletions(-)
hooks/post-receive
--
GNU Inetutils
_______________________________________________
Commit-inetutils mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/commit-inetutils