2009-11-16 12:00:45 +01:00
|
|
|
--- ip/ipaddress.c 2009-03-24 22:40:54.000000000 +0000
|
|
|
|
+++ ip/ipaddress.c 2009-11-11 09:30:07.000000000 +0000
|
|
|
|
@@ -692,6 +692,12 @@
|
2007-01-16 00:17:45 +01:00
|
|
|
if (flush) {
|
|
|
|
int round = 0;
|
|
|
|
char flushb[4096-512];
|
2009-11-16 12:00:45 +01:00
|
|
|
+ uid_t uid = geteuid();
|
2007-01-16 00:17:45 +01:00
|
|
|
+
|
|
|
|
+ if(uid) {
|
|
|
|
+ fprintf(stderr, "Not sufficient rights to flush\n");
|
|
|
|
+ exit(EXIT_FAILURE);
|
|
|
|
+ }
|
|
|
|
|
|
|
|
filter.flushb = flushb;
|
|
|
|
filter.flushp = 0;
|
2009-11-16 12:00:45 +01:00
|
|
|
--- ip/iproute.c 2009-11-11 09:30:07.000000000 +0000
|
|
|
|
+++ ip/iproute.c 2009-11-11 09:35:23.000000000 +0000
|
|
|
|
@@ -1212,6 +1212,12 @@
|
2007-01-16 00:17:45 +01:00
|
|
|
int round = 0;
|
|
|
|
char flushb[4096-512];
|
|
|
|
time_t start = time(0);
|
2009-11-16 12:00:45 +01:00
|
|
|
+ uid_t uid = geteuid();
|
|
|
|
+
|
2007-01-16 00:17:45 +01:00
|
|
|
+ if(uid) {
|
|
|
|
+ fprintf(stderr, "Not sufficient rights to flush\n");
|
|
|
|
+ exit(EXIT_FAILURE);
|
|
|
|
+ }
|
|
|
|
|
2009-11-16 12:00:45 +01:00
|
|
|
if (filter.cloned) {
|
2007-01-16 00:17:45 +01:00
|
|
|
if (do_ipv6 != AF_INET6) {
|