]> git.ipfire.org Git - thirdparty/mtr.git/commitdiff
mtr v0.42 v0.42
authorRoger Wolff <r.e.wolff@bitwizard.nl>
Sat, 4 Mar 2000 00:00:00 +0000 (00:00 +0000)
committerTravis Cross <tc@traviscross.com>
Sun, 3 Feb 2013 20:45:37 +0000 (20:45 +0000)
 - Compile misc.

source: ftp://ftp.bitwizard.nl/mtr/mtr-0.42.tar.gz

README
TODO
configure.in
display.h
mtr.c
net.c

diff --git a/README b/README
index 92544d4ae30d9c0bd91f0cce1f7f8b80191dc174..bc428fc6701d58bd93ce772f2793aa0c18ded79e 100644 (file)
--- a/README
+++ b/README
@@ -18,14 +18,13 @@ INSTALLING
   Slightly more hints are in the file INSTALL. If this doesn't work
   you could try reading that too.... 
 
-  To begin compiling mtr, first use the included configure script:
-
-       ./configure
-
-  The configure script will generate a Makefile.  Build mtr:
+  Compiling mtr should be as simple as:
 
        make
 
+  It should first call the "configure" script and then run "make" again
+  with the makefile that "configure" just generated. 
+
   After compiling, install:
 
        make install
@@ -40,9 +39,19 @@ INSTALLING
 
   It seems the --no_gtk (whatever) doesn't work. Feel free to submit 
   a patch for this, I'm not that familiar with autoconf (it works for
-  me :-).
-
-  
+  me :-). 
+
+  On Solaris (and possibly other systems) the "gtk" library may be
+  installed in a directory where the dynamic linker refuses to look when
+  a binary is setuid. Roman Shterenzon reports that adding 
+        -Wl,-rpath=/usr/lib
+  to the commandline will work if you are using gnu LD. He tells me that
+  you're out of luck when you use the sun LD. That's not quite true, as
+  you can move the gtk libraries to /usr/lib instead of leaving them in
+  /usr/local/lib.  (when the ld tells you that /usr/local/lib is untrusted
+  and /usr/lib is trusted, and you trust hte gtk libs enough to want them
+  in a setuid program, then there is something to say for moving them
+  to the "trusted" directory.)
 
 
 WHERE CAN I GET THE LATEST VERSION OR MORE INFORMATION?
diff --git a/TODO b/TODO
index 2090d2bc927dd3eab6c68ce68e93ed5b16665a3f..2c2b34d40c7dd6d91d1c4544db6eca9c5682a0d4 100644 (file)
--- a/TODO
+++ b/TODO
@@ -38,6 +38,8 @@ Oh, Feel free to provide suggestions for this list.
 
   - allow "keyboard navigation" in the GTK version. 
 
+  - Keep all packets and make the "best" and "worst" columns show the
+    xx-th percentile....
 
 
 - Bugs to fix?
index 840d3df782fd1d84b8612c4c41703f6ea075bace..d6b9d5e7e75177251092dd96003601fa7413c7b2 100644 (file)
@@ -1,5 +1,5 @@
 AC_INIT(mtr.c)
-AM_INIT_AUTOMAKE(mtr, 0.41)
+AM_INIT_AUTOMAKE(mtr, 0.42)
 
 AC_SUBST(GTK_OBJ)
 AC_SUBST(CURSES_OBJ)
index 6b091d76222f6ff1d2f5f1f718f5142f38e83b7b..33f6bcf57594e9fc65f55d3405f0dec877d2adfd 100644 (file)
--- a/display.h
+++ b/display.h
@@ -32,4 +32,4 @@ int display_keyaction();
 void display_loop();
 void display_clear();
 
-int display_mode;
+extern int display_mode;
diff --git a/mtr.c b/mtr.c
index 8234b1ba04709afd4fb692cf8d00b2b443e96363..7af7ef8ef745d015e2bf8add26309218242b9d26 100644 (file)
--- a/mtr.c
+++ b/mtr.c
@@ -37,6 +37,7 @@
 #endif
 
 int DisplayMode;
+int display_mode;
 int Interactive = 1;
 int PrintVersion = 0;
 int PrintHelp = 0;
@@ -158,7 +159,7 @@ int main(int argc, char **argv) {
   net_preopen_result = net_preopen ();
 
   /*  Now drop to user permissions  */
-  if(seteuid(getuid())) {
+  if(setuid(getuid())) {
     printf("mtr: Unable to drop permissions.\n");
     exit(1);
   }
diff --git a/net.c b/net.c
index 46f4bb1723a861bf3eccf7e18f8aed4ad8eacf96..496be26a3b7420c83b28ddce77395c92a60467d1 100644 (file)
--- a/net.c
+++ b/net.c
@@ -282,7 +282,7 @@ void net_process_return() {
 
   header = (struct ICMPHeader *)(packet + sizeof(struct IPHeader));
   if(header->type == ICMP_ECHOREPLY) {
-    if(header->id != getpid())
+    if(header->id != (uint16)getpid())
       return;
 
     net_process_ping(header->sequence, fromaddr.sin_addr.s_addr, now);
@@ -293,7 +293,7 @@ void net_process_return() {
     
     header = (struct ICMPHeader *)(packet + sizeof(struct IPHeader) + 
                                sizeof(struct ICMPHeader) + sizeof(struct IPHeader));
-    if(header->id != getpid())
+    if(header->id != (uint16)getpid())
       return;
 
     net_process_ping(header->sequence, fromaddr.sin_addr.s_addr, now);