iproute2/iproute2-2.6.29-1-flushcheckuid.diff
OBS User autobuild e90015251e Accepting request 24485 from network:utilities
Copy from network:utilities/iproute2 based on submit request 24485 from user msmeissn

OBS-URL: https://build.opensuse.org/request/show/24485
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/iproute2?expand=0&rev=26
2009-11-16 11:00:45 +00:00

31 lines
759 B
Diff

--- 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 @@
if (flush) {
int round = 0;
char flushb[4096-512];
+ uid_t uid = geteuid();
+
+ if(uid) {
+ fprintf(stderr, "Not sufficient rights to flush\n");
+ exit(EXIT_FAILURE);
+ }
filter.flushb = flushb;
filter.flushp = 0;
--- 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 @@
int round = 0;
char flushb[4096-512];
time_t start = time(0);
+ uid_t uid = geteuid();
+
+ if(uid) {
+ fprintf(stderr, "Not sufficient rights to flush\n");
+ exit(EXIT_FAILURE);
+ }
if (filter.cloned) {
if (do_ipv6 != AF_INET6) {