Upgrade to 1.1.5
This commit is contained in:
parent
4b6f887d6f
commit
dfce7cf2ea
2
.gitignore
vendored
2
.gitignore
vendored
@ -1 +1 @@
|
|||||||
libnet-1.1.4.tar.gz
|
libnet-1.1.5.tar.gz
|
||||||
|
|||||||
@ -1,45 +0,0 @@
|
|||||||
Patch by Robert Scheck <robert@fedoraproject.org> for libnet >= 1.1.4, which backports
|
|
||||||
capability support instead of explicitly checking for UID 0. Further information can be
|
|
||||||
found at the following links:
|
|
||||||
|
|
||||||
- https://bugzilla.redhat.com/show_bug.cgi?id=589770
|
|
||||||
- http://github.com/sam-github/libnet/commit/671742244c20804c9e935326e3649dac3382f17a
|
|
||||||
|
|
||||||
--- libnet-1.1.4/src/libnet_init.c 2009-06-05 02:31:44.000000000 +0200
|
|
||||||
+++ libnet-1.1.4/src/libnet_init.c.capability 2010-07-09 22:57:10.000000000 +0200
|
|
||||||
@@ -44,14 +44,7 @@
|
|
||||||
{
|
|
||||||
libnet_t *l = NULL;
|
|
||||||
|
|
||||||
-#if !defined(__WIN32__)
|
|
||||||
- if (getuid() && geteuid())
|
|
||||||
- {
|
|
||||||
- snprintf(err_buf, LIBNET_ERRBUF_SIZE,
|
|
||||||
- "%s(): UID or EUID of 0 required\n", __func__);
|
|
||||||
- goto bad;
|
|
||||||
- }
|
|
||||||
-#else
|
|
||||||
+#if defined(__WIN32__)
|
|
||||||
WSADATA wsaData;
|
|
||||||
|
|
||||||
if ((WSAStartup(0x0202, &wsaData)) != 0)
|
|
||||||
--- libnet-1.1.4/src/libnet_link_linux.c 2009-06-05 02:31:44.000000000 +0200
|
|
||||||
+++ libnet-1.1.4/src/libnet_link_linux.c.capability 2010-07-09 22:58:33.000000000 +0200
|
|
||||||
@@ -90,8 +90,15 @@
|
|
||||||
|
|
||||||
if (ioctl(l->fd, SIOCGIFHWADDR, &ifr) < 0 )
|
|
||||||
{
|
|
||||||
- snprintf(l->err_buf, LIBNET_ERRBUF_SIZE,
|
|
||||||
- "SIOCGIFHWADDR: %s", strerror(errno));
|
|
||||||
+ if (errno == EPERM) {
|
|
||||||
+ snprintf(l->err_buf, LIBNET_ERRBUF_SIZE,
|
|
||||||
+ "%s(): UID/EUID 0 or capability CAP_NET_RAW required",
|
|
||||||
+ __func__);
|
|
||||||
+
|
|
||||||
+ } else {
|
|
||||||
+ snprintf(l->err_buf, LIBNET_ERRBUF_SIZE,
|
|
||||||
+ "socket: %s", strerror(errno));
|
|
||||||
+ }
|
|
||||||
goto bad;
|
|
||||||
}
|
|
||||||
|
|
||||||
@ -1,12 +1,11 @@
|
|||||||
Summary: C library for portable packet creation and injection
|
Summary: C library for portable packet creation and injection
|
||||||
Name: libnet
|
Name: libnet
|
||||||
Version: 1.1.4
|
Version: 1.1.5
|
||||||
Release: 4%{?dist}
|
Release: 1%{?dist}
|
||||||
License: BSD
|
License: BSD
|
||||||
Group: System Environment/Libraries
|
Group: System Environment/Libraries
|
||||||
URL: http://www.sourceforge.net/projects/libnet-dev/
|
URL: http://www.sourceforge.net/projects/libnet-dev/
|
||||||
Source: http://downloads.sourceforge.net/libnet-dev/%{name}-%{version}.tar.gz
|
Source: http://downloads.sourceforge.net/libnet-dev/%{name}-%{version}.tar.gz
|
||||||
Patch0: libnet-1.1.4-capability.patch
|
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@ -30,7 +29,6 @@ and sample test code for more detailed information.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
%patch0 -p1 -b .capability
|
|
||||||
|
|
||||||
# Keep the sample directory untouched by make
|
# Keep the sample directory untouched by make
|
||||||
rm -rf __dist_sample
|
rm -rf __dist_sample
|
||||||
@ -86,6 +84,9 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
%{_mandir}/man3/%{name}*.3*
|
%{_mandir}/man3/%{name}*.3*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Dec 28 2010 Robert Scheck <robert@fedoraproject.org> 1.1.5-1
|
||||||
|
- Upgrade to 1.1.5
|
||||||
|
|
||||||
* Fri Jul 09 2010 Robert Scheck <robert@fedoraproject.org> 1.1.4-4
|
* Fri Jul 09 2010 Robert Scheck <robert@fedoraproject.org> 1.1.4-4
|
||||||
- Added patch for capability support rather UID check (#589770)
|
- Added patch for capability support rather UID check (#589770)
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user