strncpy patch for nameif
This commit is contained in:
parent
57e1edd1d3
commit
3383925548
13
net-tools-1.60-nameif_strncpy.patch
Normal file
13
net-tools-1.60-nameif_strncpy.patch
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
--- net-tools-1.60/nameif.c.ncpy 2006-10-03 14:24:21.000000000 +0200
|
||||||
|
+++ net-tools-1.60/nameif.c 2006-10-03 14:22:43.000000000 +0200
|
||||||
|
@@ -100,8 +100,8 @@
|
||||||
|
struct ifreq ifr;
|
||||||
|
opensock();
|
||||||
|
memset(&ifr,0,sizeof(struct ifreq));
|
||||||
|
- strcpy(ifr.ifr_name, oldname);
|
||||||
|
- strcpy(ifr.ifr_newname, newname);
|
||||||
|
+ strncpy(ifr.ifr_name, oldname, IF_NAMESIZE);
|
||||||
|
+ strncpy(ifr.ifr_newname, newname, IF_NAMESIZE);
|
||||||
|
return ioctl(ctl_sk, SIOCSIFNAME, &ifr);
|
||||||
|
}
|
||||||
|
|
@ -69,6 +69,7 @@ Patch54: net-tools-1.60-ifconfig-long-iface-crasher.patch
|
|||||||
Patch55: net-tools-1.60-netdevice.patch
|
Patch55: net-tools-1.60-netdevice.patch
|
||||||
Patch56: net-tools-1.60-skip.patch
|
Patch56: net-tools-1.60-skip.patch
|
||||||
Patch57: net-tools-1.60-netstat-I-fix.patch
|
Patch57: net-tools-1.60-netstat-I-fix.patch
|
||||||
|
Patch58: net-tools-1.60-nameif_strncpy.patch
|
||||||
|
|
||||||
BuildRoot: %{_tmppath}/%{name}-root
|
BuildRoot: %{_tmppath}/%{name}-root
|
||||||
Requires(post,preun): chkconfig
|
Requires(post,preun): chkconfig
|
||||||
@ -135,6 +136,7 @@ ifconfig, netstat, route, and others.
|
|||||||
%patch55 -p1 -b .netdevice
|
%patch55 -p1 -b .netdevice
|
||||||
%patch56 -p1 -b .skip
|
%patch56 -p1 -b .skip
|
||||||
%patch57 -p1
|
%patch57 -p1
|
||||||
|
%patch58 -p1 -b .strncpy
|
||||||
|
|
||||||
cp %SOURCE2 ./config.h
|
cp %SOURCE2 ./config.h
|
||||||
cp %SOURCE3 ./config.make
|
cp %SOURCE3 ./config.make
|
||||||
|
Loading…
Reference in New Issue
Block a user