- install mtr as SUID binary (#518828)

- use fprintf instead of perror when getaddrinfo fails (#516603)
This commit is contained in:
Adam Tkac 2009-12-07 13:40:29 +00:00
parent 51380147e9
commit 92ebd991b7
2 changed files with 20 additions and 2 deletions

View File

@ -1,7 +1,7 @@
Summary: A network diagnostic tool Summary: A network diagnostic tool
Name: mtr Name: mtr
Version: 0.75 Version: 0.75
Release: 5%{?dist} Release: 6%{?dist}
Epoch: 2 Epoch: 2
Group: Applications/Internet Group: Applications/Internet
License: GPLv2+ License: GPLv2+
@ -11,6 +11,7 @@ Source1: xmtr.consolehelper
Source2: xmtr.pam Source2: xmtr.pam
Source3: net-x%{name}.desktop Source3: net-x%{name}.desktop
Patch0: mtr-0.75-fd-flags.path Patch0: mtr-0.75-fd-flags.path
Patch1: mtr075-rh516603.patch
BuildRequires: ncurses-devel gtk2-devel desktop-file-utils BuildRequires: ncurses-devel gtk2-devel desktop-file-utils
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@ -34,6 +35,7 @@ diagnostic tool.
%prep %prep
%setup -q %setup -q
%patch0 -p1 -b .fd-flags %patch0 -p1 -b .fd-flags
%patch1 -p1 -b .rh516603
%build %build
%configure --enable-gtk2 %configure --enable-gtk2
@ -71,7 +73,7 @@ rm -rf $RPM_BUILD_ROOT
%files %files
%defattr(-,root,root,-) %defattr(-,root,root,-)
%doc AUTHORS COPYING FORMATS NEWS README SECURITY %doc AUTHORS COPYING FORMATS NEWS README SECURITY
%attr(0755,root,root) %{_sbindir}/mtr %attr(4755,root,root) %{_sbindir}/mtr
%{_mandir}/man8/* %{_mandir}/man8/*
%files gtk %files gtk
@ -84,6 +86,10 @@ rm -rf $RPM_BUILD_ROOT
%{_datadir}/pixmaps/mtr_icon.xpm %{_datadir}/pixmaps/mtr_icon.xpm
%changelog %changelog
* Mon Dec 07 2009 Adam Tkac <atkac redhat com> 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 <atkac redhat com> 2:0.75-5 * Fri Sep 25 2009 Adam Tkac <atkac redhat com> 2:0.75-5
- remove unneeded build requires (#525547) - remove unneeded build requires (#525547)

12
mtr075-rh516603.patch Normal file
View File

@ -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. */