This commit is contained in:
commit
5a99a89631
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
## Default LFS
|
||||
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||
*.png filter=lfs diff=lfs merge=lfs -text
|
||||
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||
*.zst filter=lfs diff=lfs merge=lfs -text
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
.osc
|
10
bing-1.0.5-includes.diff
Normal file
10
bing-1.0.5-includes.diff
Normal file
@ -0,0 +1,10 @@
|
||||
--- bing.c
|
||||
+++ bing.c
|
||||
@@ -161,6 +161,7 @@
|
||||
#include <netinet/in.h>
|
||||
#include <netinet/ip.h>
|
||||
#include <netinet/ip_icmp.h>
|
||||
+#include <arpa/inet.h>
|
||||
#ifndef linux
|
||||
#include <netinet/ip_var.h>
|
||||
#endif /* linux */
|
63
bing-1.0.5-moresecure.diff
Normal file
63
bing-1.0.5-moresecure.diff
Normal file
@ -0,0 +1,63 @@
|
||||
--- bing-1.0.4/bing.c.xx 2005-01-26 13:16:53.039927038 +0100
|
||||
+++ bing-1.0.4/bing.c 2005-01-26 13:17:25.090900141 +0100
|
||||
@@ -1241,6 +1241,31 @@
|
||||
char rspace[3 + 4 * NROUTES + 1]; /* record route space */
|
||||
#endif
|
||||
|
||||
+ if (!(proto = getprotobyname("icmp"))) {
|
||||
+ (void)fprintf(stderr, "bing: unknown protocol icmp.\n");
|
||||
+ exit(1);
|
||||
+ }
|
||||
+ if ((s = socket(AF_INET, SOCK_RAW, proto->p_proto)) < 0) {
|
||||
+ perror("bing: socket");
|
||||
+ exit(1);
|
||||
+ }
|
||||
+
|
||||
+ // drop root privs
|
||||
+ if((pwd = getpwuid(getuid())) == NULL)
|
||||
+ {
|
||||
+ perror("bing: getpwuid()");
|
||||
+ exit(1);
|
||||
+ }
|
||||
+ if(initgroups(pwd->pw_name, pwd->pw_gid) < 0)
|
||||
+ {
|
||||
+ perror("bing: initgroups()");
|
||||
+ exit(1);
|
||||
+ }
|
||||
+ setgid(getgid());
|
||||
+ setuid(getuid());
|
||||
+
|
||||
+
|
||||
+
|
||||
hs1 = &hoststats1;
|
||||
hs2 = &hoststats2;
|
||||
|
||||
@@ -1401,28 +1426,6 @@
|
||||
|
||||
ident = getpid() & 0xFFFF;
|
||||
|
||||
- if (!(proto = getprotobyname("icmp"))) {
|
||||
- (void)fprintf(stderr, "bing: unknown protocol icmp.\n");
|
||||
- exit(1);
|
||||
- }
|
||||
- if ((s = socket(AF_INET, SOCK_RAW, proto->p_proto)) < 0) {
|
||||
- perror("bing: socket");
|
||||
- exit(1);
|
||||
- }
|
||||
-
|
||||
- // drop root privs
|
||||
- if((pwd = getpwuid(getuid())) == NULL)
|
||||
- {
|
||||
- perror("bing: getpwuid()");
|
||||
- exit(1);
|
||||
- }
|
||||
- if(initgroups(pwd->pw_name, pwd->pw_gid) < 0)
|
||||
- {
|
||||
- perror("bing: initgroups()");
|
||||
- exit(1);
|
||||
- }
|
||||
- setgid(getgid());
|
||||
- setuid(getuid());
|
||||
|
||||
hold = 1;
|
||||
if (options & F_SO_DEBUG)
|
8
bing-1.0.5-permissions.patch
Normal file
8
bing-1.0.5-permissions.patch
Normal file
@ -0,0 +1,8 @@
|
||||
--- Makefile
|
||||
+++ Makefile
|
||||
@@ -29,4 +29,4 @@
|
||||
|
||||
install: bing bing.8
|
||||
$(INSTALL) -m 644 bing.8 $(MANDIR)/man8
|
||||
- $(INSTALL) -m 4555 -o root -g root bing $(BINDIR)
|
||||
+ $(INSTALL) -m 4555 bing $(BINDIR)
|
141
bing-1.0.5.dif
Normal file
141
bing-1.0.5.dif
Normal file
@ -0,0 +1,141 @@
|
||||
--- Makefile
|
||||
+++ Makefile 2000/02/02 16:03:05
|
||||
@@ -1,8 +1,8 @@
|
||||
#
|
||||
# Makefile,v 1.4 1995/07/21 00:03:30 pb Exp
|
||||
#
|
||||
-MANDIR=/usr/local/man
|
||||
-BINDIR=/usr/local/bin
|
||||
+MANDIR=/usr/man
|
||||
+BINDIR=/usr/bin
|
||||
INSTALL=install -c
|
||||
GROFF=groff
|
||||
NROFF=nroff
|
||||
@@ -28,5 +28,5 @@
|
||||
$(RM) -f bing bing.ps bing.0
|
||||
|
||||
install: bing bing.8
|
||||
- $(INSTALL) -m 644 -o man -g man bing.8 $(MANDIR)/man8
|
||||
- $(INSTALL) -m 4555 -o root -g staff bing $(BINDIR)
|
||||
+ $(INSTALL) -m 644 bing.8 $(MANDIR)/man8
|
||||
+ $(INSTALL) -m 4555 -o root -g root bing $(BINDIR)
|
||||
--- bing.c
|
||||
+++ bing.c 2000/02/02 16:03:23
|
||||
@@ -171,6 +171,8 @@
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
#include <limits.h>
|
||||
+#include <pwd.h>
|
||||
+#include <grp.h>
|
||||
|
||||
#include "sysdep.h"
|
||||
|
||||
@@ -527,7 +529,7 @@
|
||||
(void)printf(" %1x %04x", ((ip->ip_off) & 0xe000) >> 13,
|
||||
(ip->ip_off) & 0x1fff);
|
||||
(void)printf(" %02x %02x %04x", ip->ip_ttl, ip->ip_p, ip->ip_sum);
|
||||
-#ifdef linux
|
||||
+#if defined linux && !defined __NETINET_IP_ICMP_H
|
||||
(void)printf(" %s ", inet_ntoa(ip->ip_src));
|
||||
(void)printf(" %s ", inet_ntoa(ip->ip_dst));
|
||||
#else
|
||||
@@ -641,7 +643,7 @@
|
||||
(void)printf("Redirect, Bad Code: %d", icp->icmp_code);
|
||||
break;
|
||||
}
|
||||
-#ifdef linux
|
||||
+#if defined linux && !defined __NETINET_IP_ICMP_H
|
||||
(void)printf("(New addr: 0x%08lx)\n", icp->icmp_gwaddr);
|
||||
#else
|
||||
(void)printf("(New addr: 0x%08lx)\n", icp->icmp_gwaddr.s_addr);
|
||||
@@ -668,7 +670,7 @@
|
||||
pr_retip((struct ip *)ICMP_TO_DATA(icp));
|
||||
break;
|
||||
case ICMP_PARAMPROB:
|
||||
-#ifdef linux
|
||||
+#if defined linux && !defined __NETINET_IP_ICMP_H
|
||||
(void)printf("Parameter problem: pointer = 0x%02x\n",
|
||||
icp->un.gateway);
|
||||
#else
|
||||
@@ -1226,6 +1228,7 @@
|
||||
struct protoent *proto;
|
||||
struct in_addr ifaddr;
|
||||
struct hoststats *hs1, *hs2;
|
||||
+ struct passwd *pwd;
|
||||
int ntrans, nloops, bits;
|
||||
int i;
|
||||
int ch, hold, recv_packlen, preload;
|
||||
@@ -1403,6 +1406,21 @@
|
||||
perror("bing: socket");
|
||||
exit(1);
|
||||
}
|
||||
+
|
||||
+ // drop root privs
|
||||
+ if((pwd = getpwuid(getuid())) == NULL)
|
||||
+ {
|
||||
+ perror("bing: getpwuid()");
|
||||
+ exit(1);
|
||||
+ }
|
||||
+ if(initgroups(pwd->pw_name, pwd->pw_gid) < 0)
|
||||
+ {
|
||||
+ perror("bing: initgroups()");
|
||||
+ exit(1);
|
||||
+ }
|
||||
+ setgid(getgid());
|
||||
+ setuid(getuid());
|
||||
+
|
||||
hold = 1;
|
||||
if (options & F_SO_DEBUG)
|
||||
(void)setsockopt(s, SOL_SOCKET, SO_DEBUG, (char *)&hold,
|
||||
--- sysdep.h
|
||||
+++ sysdep.h 2000/02/02 16:03:05
|
||||
@@ -46,7 +46,7 @@
|
||||
#ifndef _SYSDEP_H_
|
||||
#define _SYSDEP_H_
|
||||
|
||||
-#ifdef linux
|
||||
+#if defined linux && !defined __NETINET_IP_ICMP_H
|
||||
#define icmp icmphdr
|
||||
#define ip iphdr
|
||||
#define icmp_type type
|
||||
@@ -66,7 +66,9 @@
|
||||
#define ip_sum check
|
||||
#define ip_src saddr
|
||||
#define ip_dst daddr
|
||||
+#ifndef MAX_IPOPTLEN
|
||||
#define MAX_IPOPTLEN 4096
|
||||
+#endif
|
||||
#define ICMP_MINLEN 16
|
||||
|
||||
#define IPOPT_MINOFF 4
|
||||
--- bing.c.xx 2005-01-26 12:50:36.266794880 +0100
|
||||
+++ bing.c 2005-01-26 12:52:08.935169111 +0100
|
||||
@@ -168,6 +168,7 @@
|
||||
#include <netdb.h>
|
||||
#include <unistd.h>
|
||||
#include <stdio.h>
|
||||
+#include <stdlib.h>
|
||||
#include <ctype.h>
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
@@ -1234,7 +1235,7 @@
|
||||
int i;
|
||||
int ch, hold, recv_packlen, preload;
|
||||
u_char *datap, *recv_packet;
|
||||
- char *target1, *target2, *malloc();
|
||||
+ char *target1, *target2;
|
||||
u_char ttl, loop;
|
||||
#ifdef IP_OPTIONS
|
||||
char rspace[3 + 4 * NROUTES + 1]; /* record route space */
|
||||
@@ -1349,9 +1350,10 @@
|
||||
moptions |= MULTICAST_IF;
|
||||
{
|
||||
int i1, i2, i3, i4;
|
||||
+ char dummy;
|
||||
|
||||
if (sscanf(optarg, "%u.%u.%u.%u%c",
|
||||
- &i1, &i2, &i3, &i4, &i) != 4) {
|
||||
+ &i1, &i2, &i3, &i4, &dummy) != 4) {
|
||||
printf("bad interface address '%s'\n",
|
||||
optarg);
|
||||
exit(1);
|
3
bing-1.0.5.tar.bz2
Normal file
3
bing-1.0.5.tar.bz2
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:ce91ddda36f380e94628b5623df438c20c3e0f28b111d97e850a3720833c314e
|
||||
size 26115
|
95
bing.changes
Normal file
95
bing.changes
Normal file
@ -0,0 +1,95 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Jan 25 21:34:37 CET 2006 - mls@suse.de
|
||||
|
||||
- converted neededforbuild to BuildRequires
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Jul 11 17:41:54 CEST 2005 - postadal@suse.cz
|
||||
|
||||
- updated to version 1.0.5
|
||||
- bziped
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jan 26 12:58:32 CET 2005 - meissner@suse.de
|
||||
|
||||
- added RPM_OPT_FLAGS. Fixed some bugs.
|
||||
- Moved privilege drop up to earliest place.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Nov 11 14:22:44 CET 2004 - ro@suse.de
|
||||
|
||||
- permission handling fixes
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Aug 23 14:42:11 CEST 2004 - postadal@suse.cz
|
||||
|
||||
- added missing include arpa/inet.h [#43637]
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jun 23 11:03:42 CEST 2004 - hmacht@suse.de
|
||||
|
||||
- building as non root user
|
||||
- added patch to correct owner/group
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Apr 6 07:02:41 CEST 2004 - kukuk@suse.de
|
||||
|
||||
- Fix default permissions
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Sep 17 17:34:28 CEST 2002 - ro@suse.de
|
||||
|
||||
- removed bogus self-provides
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jan 24 09:47:51 CET 2001 - nadvornik@suse.de
|
||||
|
||||
- fixed usage of %{_mandir}
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Apr 26 13:18:23 MEST 2000 - nadvornik@suse.cz
|
||||
|
||||
- added URL
|
||||
- changed Group
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Apr 7 16:13:00 CEST 2000 - nadvornik@suse.cz
|
||||
|
||||
- added BuildRoot
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Feb 2 17:13:22 CET 2000 - ro@suse.de
|
||||
|
||||
- applied another security fix
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jan 26 14:17:24 CET 2000 - ro@suse.de
|
||||
|
||||
- applied small security fix
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Jan 17 17:28:23 CET 2000 - ro@suse.de
|
||||
|
||||
- man to usr/share/man
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Sep 13 17:23:57 CEST 1999 - bs@suse.de
|
||||
|
||||
- ran old prepare_spec on spec file to switch to new prepare_spec.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jun 17 13:33:10 MEST 1998 - ro@suse.de
|
||||
|
||||
- changed "ifdef linux" to "defined linux && !defined __NETINET_IP_ICMP_H"
|
||||
to build with libc5 and glibc
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Nov 27 12:06:46 MET 1997 - bs@suse.de
|
||||
|
||||
- compressed man page
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Oct 31 11:37:04 MET 1997 - ro@suse.de
|
||||
|
||||
- first suse version 1.0.4
|
||||
|
112
bing.spec
Normal file
112
bing.spec
Normal file
@ -0,0 +1,112 @@
|
||||
#
|
||||
# spec file for package bing (Version 1.0.5)
|
||||
#
|
||||
# Copyright (c) 2005 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
# This file and all modifications and additions to the pristine
|
||||
# package are under the same license as the package itself.
|
||||
#
|
||||
# Please submit bugfixes or comments via http://www.suse.de/feedback/
|
||||
#
|
||||
|
||||
# norootforbuild
|
||||
|
||||
Name: bing
|
||||
License: BSD
|
||||
Group: Productivity/Networking/Diagnostic
|
||||
PreReq: permissions
|
||||
Autoreqprov: on
|
||||
URL: http://www.freenix.fr/freenix/logiciels/bing.html
|
||||
Summary: A Point-to-Point Bandwidth Measurement tool
|
||||
Version: 1.0.5
|
||||
Release: 1
|
||||
Source: bing-%{version}.tar.bz2
|
||||
Patch0: bing-%{version}.dif
|
||||
Patch1: %{name}-%{version}-permissions.patch
|
||||
Patch2: %{name}-%{version}-includes.diff
|
||||
Patch3: %{name}-%{version}-moresecure.diff
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
|
||||
%description
|
||||
Bing determines the real (raw, as opposed to available or average)
|
||||
throughput of a link by measuring ICMP echo request round trip times
|
||||
for different packet sizes for each end of the link.
|
||||
|
||||
|
||||
|
||||
Authors:
|
||||
--------
|
||||
Pierre Beyssac <pb@fasterix.freenix.fr>
|
||||
|
||||
%prep
|
||||
%setup
|
||||
%patch
|
||||
%patch1
|
||||
%patch2
|
||||
%patch3 -p1
|
||||
|
||||
%build
|
||||
make CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
|
||||
|
||||
%install
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
mkdir -p $RPM_BUILD_ROOT/{%{_mandir}/man8,usr/bin}
|
||||
make install MANDIR=$RPM_BUILD_ROOT/%{_mandir} BINDIR=$RPM_BUILD_ROOT/usr/bin
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
%post
|
||||
%run_permissions
|
||||
|
||||
%verifyscript
|
||||
%verify_permissions -e /usr/bin/bing
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
%verify(not mode) %attr(4750,root,trusted) /usr/bin/bing
|
||||
%doc %{_mandir}/man8/bing.*
|
||||
%doc bing.ps
|
||||
%doc ChangeLog README
|
||||
|
||||
%changelog -n bing
|
||||
* Wed Jan 25 2006 - mls@suse.de
|
||||
- converted neededforbuild to BuildRequires
|
||||
* Mon Jul 11 2005 - postadal@suse.cz
|
||||
- updated to version 1.0.5
|
||||
- bziped
|
||||
* Wed Jan 26 2005 - meissner@suse.de
|
||||
- added RPM_OPT_FLAGS. Fixed some bugs.
|
||||
- Moved privilege drop up to earliest place.
|
||||
* Thu Nov 11 2004 - ro@suse.de
|
||||
- permission handling fixes
|
||||
* Mon Aug 23 2004 - postadal@suse.cz
|
||||
- added missing include arpa/inet.h [#43637]
|
||||
* Wed Jun 23 2004 - hmacht@suse.de
|
||||
- building as non root user
|
||||
- added patch to correct owner/group
|
||||
* Tue Apr 06 2004 - kukuk@suse.de
|
||||
- Fix default permissions
|
||||
* Tue Sep 17 2002 - ro@suse.de
|
||||
- removed bogus self-provides
|
||||
* Wed Jan 24 2001 - nadvornik@suse.de
|
||||
- fixed usage of %%{_mandir}
|
||||
* Wed Apr 26 2000 - nadvornik@suse.cz
|
||||
- added URL
|
||||
- changed Group
|
||||
* Fri Apr 07 2000 - nadvornik@suse.cz
|
||||
- added BuildRoot
|
||||
* Wed Feb 02 2000 - ro@suse.de
|
||||
- applied another security fix
|
||||
* Wed Jan 26 2000 - ro@suse.de
|
||||
- applied small security fix
|
||||
* Mon Jan 17 2000 - ro@suse.de
|
||||
- man to usr/share/man
|
||||
* Mon Sep 13 1999 - bs@suse.de
|
||||
- ran old prepare_spec on spec file to switch to new prepare_spec.
|
||||
* Wed Jun 17 1998 - ro@suse.de
|
||||
- changed "ifdef linux" to "defined linux && !defined __NETINET_IP_ICMP_H"
|
||||
to build with libc5 and glibc
|
||||
* Thu Nov 27 1997 - bs@suse.de
|
||||
- compressed man page
|
||||
* Fri Oct 31 1997 - ro@suse.de
|
||||
- first suse version 1.0.4
|
Loading…
Reference in New Issue
Block a user