From 92ebd991b760d840bdd7320abf2f016120fc2323 Mon Sep 17 00:00:00 2001 From: Adam Tkac Date: Mon, 7 Dec 2009 13:40:29 +0000 Subject: [PATCH] - install mtr as SUID binary (#518828) - use fprintf instead of perror when getaddrinfo fails (#516603) --- mtr.spec | 10 ++++++++-- mtr075-rh516603.patch | 12 ++++++++++++ 2 files changed, 20 insertions(+), 2 deletions(-) create mode 100644 mtr075-rh516603.patch diff --git a/mtr.spec b/mtr.spec index 5652477..5d653e7 100644 --- a/mtr.spec +++ b/mtr.spec @@ -1,7 +1,7 @@ Summary: A network diagnostic tool Name: mtr Version: 0.75 -Release: 5%{?dist} +Release: 6%{?dist} Epoch: 2 Group: Applications/Internet License: GPLv2+ @@ -11,6 +11,7 @@ Source1: xmtr.consolehelper Source2: xmtr.pam Source3: net-x%{name}.desktop Patch0: mtr-0.75-fd-flags.path +Patch1: mtr075-rh516603.patch BuildRequires: ncurses-devel gtk2-devel desktop-file-utils Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -34,6 +35,7 @@ diagnostic tool. %prep %setup -q %patch0 -p1 -b .fd-flags +%patch1 -p1 -b .rh516603 %build %configure --enable-gtk2 @@ -71,7 +73,7 @@ rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) %doc AUTHORS COPYING FORMATS NEWS README SECURITY -%attr(0755,root,root) %{_sbindir}/mtr +%attr(4755,root,root) %{_sbindir}/mtr %{_mandir}/man8/* %files gtk @@ -84,6 +86,10 @@ rm -rf $RPM_BUILD_ROOT %{_datadir}/pixmaps/mtr_icon.xpm %changelog +* Mon Dec 07 2009 Adam Tkac 2:0.75-6 +- install mtr as SUID binary (#518828) +- use fprintf instead of perror when getaddrinfo fails (#516603) + * Fri Sep 25 2009 Adam Tkac 2:0.75-5 - remove unneeded build requires (#525547) diff --git a/mtr075-rh516603.patch b/mtr075-rh516603.patch new file mode 100644 index 0000000..7c61618 --- /dev/null +++ b/mtr075-rh516603.patch @@ -0,0 +1,12 @@ +diff -up mtr-0.75/mtr.c.rh516603 mtr-0.75/mtr.c +--- mtr-0.75/mtr.c.rh516603 2009-12-07 14:27:27.281726685 +0100 ++++ mtr-0.75/mtr.c 2009-12-07 14:28:32.574226121 +0100 +@@ -402,7 +402,7 @@ int main(int argc, char **argv) + hints.ai_socktype = SOCK_DGRAM; + error = getaddrinfo( Hostname, NULL, &hints, &res ); + if ( error ) { +- perror( gai_strerror(error) ); ++ fprintf(stderr, "%s\n", gai_strerror(error)); + exit( EXIT_FAILURE ); + } + /* Convert the first addrinfo into a hostent. */