SHA256
1
0
forked from pool/openvpn
OBS User unknown 2008-05-22 23:58:33 +00:00 committed by Git OBS Bridge
parent bdc110c4d5
commit ec4f867b8f
4 changed files with 31 additions and 41 deletions

View File

@ -1,30 +0,0 @@
--- plugin.c
+++ plugin.c 2007/11/28 08:58:20
@@ -182,7 +182,26 @@ plugin_init_item (struct plugin *p, cons
p->plugin_type_mask = plugin_supported_types ();
#if defined(USE_LIBDL)
- p->handle = dlopen (p->so_pathname, RTLD_NOW);
+ p->handle = NULL;
+#if defined(PLUGIN_LIBDIR)
+ if (!strchr(p->so_pathname, '/'))
+ {
+ char full[PATH_MAX], *name;
+
+ snprintf(full, sizeof(full), "%s/%s", PLUGIN_LIBDIR, p->so_pathname);
+ p->handle = dlopen (full, RTLD_NOW);
+#if defined(ENABLE_PLUGIN_SEARCH)
+ if (!p->handle)
+ {
+ p->handle = dlopen (p->so_pathname, RTLD_NOW);
+ }
+#endif
+ }
+ else
+#endif
+ {
+ p->handle = dlopen (p->so_pathname, RTLD_NOW);
+ }
if (!p->handle)
msg (M_ERR, "PLUGIN_INIT: could not load plugin shared object %s: %s", p->so_pathname, dlerror());
libdl_resolve_symbol (p->handle, (void*)&p->open, "openvpn_plugin_open_v1", p->so_pathname, PLUGIN_SYMBOL_REQUIRED);

View File

@ -1,3 +1,15 @@
-------------------------------------------------------------------
Thu May 22 18:21:59 CEST 2008 - mt@suse.de
- Added -lpam to LDFLAGS of openvpn, because linking the openvpn
auth-pam plugin against pam is not sufficient. Many pam modules
that are loaded by pam during the authentication process are not
linked against pam and contain undefined symbols, causing the
authentication to fail (bnc#334773).
- Replaced patch loading plugins from /usr/%_lib/openvpn/plugin/lib
with -rpath linker flags (bnc#334773).
- Fixed init script to use startproc to return 0 when started twice.
-------------------------------------------------------------------
Tue Feb 19 11:32:55 CET 2008 - mt@suse.de

View File

@ -77,7 +77,7 @@ case "$1" in
for conf in $confdir/*.conf; do
pidfile=$(basename ${conf%%.conf}).pid
$openvpn --daemon \
startproc -p $piddir/$pidfile $openvpn --daemon \
--writepid $piddir/$pidfile \
--config $conf \
--cd $confdir \

View File

@ -20,15 +20,14 @@ AutoReqProv: on
PreReq: %insserv_prereq %fillup_prereq
%endif
Version: 2.0.9
Release: 70
Release: 90
Summary: Full-featured SSL VPN solution using a TUN/TAP Interface
Source: http://openvpn.net/release/openvpn-%{version}.tar.gz
Source1: http://openvpn.net/signatures/openvpn-%{version}.tar.gz.asc
Source2: openvpn.init
Source3: openvpn.README.SUSE
Patch1: %{name}-%{version}-plugin-dir.dif
Patch2: %{name}-%{version}-plugin-man.dif
Patch3: %{name}-%{version}-plugin-build.dif
Patch1: %{name}-%{version}-plugin-man.dif
Patch2: %{name}-%{version}-plugin-build.dif
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: lzo-devel openssl-devel
BuildRequires: pam-devel
@ -61,6 +60,7 @@ Authors:
James Yonan <jim@yonan.net>
%package down-root-plugin
License: GPL v2 or later; LGPL v2.1 or later
Summary: OpenVPN down-root plugin
Group: Productivity/Networking/Security
AutoReqProv: on
@ -85,6 +85,7 @@ Authors:
James Yonan <jim@yonan.net>
%package auth-pam-plugin
License: GPL v2 or later; LGPL v2.1 or later
Summary: OpenVPN auth-pam plugin
Group: Productivity/Networking/Security
AutoReqProv: on
@ -114,7 +115,6 @@ Authors:
%setup -q
%patch1 -p0
%patch2 -p0
%patch3 -p0
sed -e "s|@PLUGIN_DIR@|%{plugin_dir}|g" \
-e "s|@PLUGIN_LIBDIR@|%{plugin_libdir}|g" \
-e "s|@PLUGIN_DOCDIR@|%{_defaultdocdir}/%{name}|g" \
@ -123,13 +123,12 @@ sed -e "s|@PLUGIN_DIR@|%{plugin_dir}|g" \
%build
autoreconf -fi
export CFLAGS="$RPM_OPT_FLAGS -W -Wall"
export LDFLAGS=""
PLUGIN_DEFS="-DPLUGIN_LIBDIR='\"%{_libdir}/%{name}/plugin/lib\"'"
PLUGIN_DEFS="$PLUGIN_FLAGS -DENABLE_PLUGIN_SEARCH"
export LDFLAGS
%configure \
--enable-pthread --enable-iproute2 \
--enable-pthread --enable-iproute2 \
--with-lzo-headers=%_includedir/lzo \
CFLAGS="$CFLAGS -fPIE $PLUGIN_DEFS" LDFLAGS="$LDFLAGS -pie"
CFLAGS="$CFLAGS -fPIE $PLUGIN_DEFS" \
LDFLAGS="$LDFLAGS -pie -lpam -rdynamic -Wl,-rpath,%{_libdir}/%{name}/plugin/lib"
make
#
# Build down-root plugin
@ -216,6 +215,15 @@ if ! test -f /.buildenv; then rm -rf $RPM_BUILD_ROOT; fi
%{plugin_libdir}/openvpn-auth-pam.so
%changelog
* Thu May 22 2008 mt@suse.de
- Added -lpam to LDFLAGS of openvpn, because linking the openvpn
auth-pam plugin against pam is not sufficient. Many pam modules
that are loaded by pam during the authentication process are not
linked against pam and contain undefined symbols, causing the
authentication to fail (bnc#334773).
- Replaced patch loading plugins from /usr/%%_lib/openvpn/plugin/lib
with -rpath linker flags (bnc#334773).
- Fixed init script to use startproc to return 0 when started twice.
* Tue Feb 19 2008 mt@suse.de
- Fixed spec file to not set pie flags when building plugins
* Thu Jan 17 2008 mt@suse.de