OBS User unknown 2007-01-29 16:01:10 +00:00 committed by Git OBS Bridge
parent 4f6b822cbd
commit 8e69ea0d0c
3 changed files with 60 additions and 3 deletions

View File

@ -0,0 +1,46 @@
--- tc/m_ipt.c.orig 2007-01-29 10:14:01.000000000 +0100
+++ tc/m_ipt.c 2007-01-29 10:50:37.000000000 +0100
@@ -9,7 +9,7 @@
*
* Authors: J Hadi Salim (hadi@cyberus.ca)
*
- * TODO: bad bad hardcoding IPT_LIB_DIR and PROC_SYS_MODPROBE
+ * TODO: bad bad hardcoding PROC_SYS_MODPROBE
*
*/
@@ -47,10 +47,6 @@
#define FALSE 0
#endif
-#ifndef IPT_LIB_DIR
-#define IPT_LIB_DIR "/usr/local/lib/iptables"
-#endif
-
#ifndef PROC_SYS_MODPROBE
#define PROC_SYS_MODPROBE "/proc/sys/kernel/modprobe"
#endif
@@ -233,8 +229,13 @@
char *error;
char *new_name, *lname;
struct iptables_target *m;
+ char ipt_lib_dir[30] = "/usr/lib/iptables";
+
+ if (access (ipt_lib_dir,R_OK)) {
+ strcpy (ipt_lib_dir,"/usr/lib64/iptables");
+ }
- char path[sizeof (IPT_LIB_DIR) + sizeof ("/libipt_.so") + strlen(name)];
+ char path[sizeof (ipt_lib_dir) + sizeof ("/libipt_.so") + strlen(name)];
new_name = malloc(strlen(name) + 1);
lname = malloc(strlen(name) + 1);
@@ -265,7 +266,7 @@
}
}
- sprintf(path, IPT_LIB_DIR "/libipt_%s.so", new_name);
+ sprintf(path, "%s/libipt_%s.so", ipt_lib_dir,new_name);
handle = dlopen(path, RTLD_LAZY);
if (!handle) {
sprintf(path, IPT_LIB_DIR "/libipt_%s.so", lname);

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Mon Jan 29 11:00:08 CET 2007 - ms@suse.de
- fixed wrong IPT_LIB_DIR value and replaced the code by a
dynamic check for the /usr/%lib/iptables directory (#238886)
-------------------------------------------------------------------
Tue Nov 7 01:06:43 CET 2006 - ro@suse.de

View File

@ -1,7 +1,7 @@
#
# spec file for package iproute2 (Version 2.6.15)
#
# Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2007 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.
#
@ -13,12 +13,12 @@
Name: iproute2
BuildRequires: db-devel ghostscript-fonts-std ghostscript-x11 glib libpng-devel libtiff-devel sgmltool te_ams te_latex xorg-x11-devel
%define dateversion 060110
License: GNU General Public License (GPL) - all versions
License: GNU General Public License (GPL)
Group: Productivity/Networking/Routing
Provides: iproute
Autoreqprov: on
Version: 2.6.15
Release: 32
Release: 50
Summary: Advanced Routing
URL: http://developer.osdl.org/dev/iproute2/
Source0: %name-%version-%dateversion.tar.bz2
@ -30,6 +30,7 @@ Patch3: %name-2.6.14-nostrip.diff
Patch4: %name-tc-flex-fixes.patch
Patch5: %name-resolve-address.diff
Patch6: %name-2.6.15-060110.dif
Patch7: %name-2.6.15-ipt-lib-dir.diff
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%package -n libnlink
Summary: A Higher Level Interface to the Netlink Service
@ -64,6 +65,7 @@ Authors:
%patch4
%patch5
%patch6
%patch7
find . -name *.orig -print0 | xargs -r0 rm -v
%build
@ -112,6 +114,9 @@ rm -rf $RPM_BUILD_ROOT
%_libdir/lib*
%changelog -n iproute2
* Mon Jan 29 2007 - ms@suse.de
- fixed wrong IPT_LIB_DIR value and replaced the code by a
dynamic check for the /usr/%%lib/iptables directory (#238886)
* Tue Nov 07 2006 - ro@suse.de
- fix permissions for manpage
* Thu Jul 20 2006 - ms@suse.de