summaryrefslogtreecommitdiff
path: root/openvpn/src/plugins/down-root
diff options
context:
space:
mode:
authorArne Schwabe <arne@rfc2549.org>2012-07-21 01:11:36 +0200
committerArne Schwabe <arne@rfc2549.org>2012-07-21 01:11:36 +0200
commitb179d94eb3b87e46721e7060386ff1a2f64669a6 (patch)
tree2d602225b423424100d022085376a36a765d0ff9 /openvpn/src/plugins/down-root
parent266db4b701d38f52fa246af45778bb2fcee9893c (diff)
Update openvpn to Version 2.3_alpha3
Diffstat (limited to 'openvpn/src/plugins/down-root')
-rwxr-xr-xopenvpn/src/plugins/down-root/Makefile18
-rw-r--r--openvpn/src/plugins/down-root/Makefile.am23
-rw-r--r--openvpn/src/plugins/down-root/README.down-root (renamed from openvpn/src/plugins/down-root/README)0
-rw-r--r--openvpn/src/plugins/down-root/down-root.c6
-rw-r--r--openvpn/src/plugins/down-root/down-root.exports4
5 files changed, 32 insertions, 19 deletions
diff --git a/openvpn/src/plugins/down-root/Makefile b/openvpn/src/plugins/down-root/Makefile
deleted file mode 100755
index e66c99ae..00000000
--- a/openvpn/src/plugins/down-root/Makefile
+++ /dev/null
@@ -1,18 +0,0 @@
-#
-# Build the OpenVPN down-root plugin module.
-#
-
-# This directory is where we will look for openvpn-plugin.h
-CPPFLAGS=-I../../../include
-
-CC=gcc
-CFLAGS=-O2 -Wall
-
-down-root.so : down-root.o
- $(CC) $(CFLAGS) -fPIC -shared $(LDFLAGS) -Wl,-soname,openvpn-down-root.so -o openvpn-down-root.so down-root.o -lc
-
-down-root.o : down-root.c
- $(CC) $(CPPFLAGS) $(CFLAGS) -fPIC -c down-root.c
-
-clean :
- -rm -f *.o *.so
diff --git a/openvpn/src/plugins/down-root/Makefile.am b/openvpn/src/plugins/down-root/Makefile.am
new file mode 100644
index 00000000..064aa30c
--- /dev/null
+++ b/openvpn/src/plugins/down-root/Makefile.am
@@ -0,0 +1,23 @@
+#
+# OpenVPN (TM) Down Root Plugin -- OpenVPN Plugin
+#
+# Copyright (C) 2012 Alon Bar-Lev <alon.barlev@gmail.com>
+#
+
+MAINTAINERCLEANFILES = \
+ $(srcdir)/Makefile.in
+
+AM_CFLAGS = \
+ -I$(top_srcdir)/include
+
+if ENABLE_PLUGIN_DOWN_ROOT
+plugin_LTLIBRARIES = openvpn-plugin-down-root.la
+dist_doc_DATA = README.down-root
+endif
+
+openvpn_plugin_down_root_la_SOURCES = \
+ down-root.c \
+ down-root.exports
+openvpn_plugin_down_root_la_LDFLAGS = $(AM_LDFLAGS) \
+ -export-symbols "$(srcdir)/down-root.exports" \
+ -module -shared -avoid-version -no-undefined
diff --git a/openvpn/src/plugins/down-root/README b/openvpn/src/plugins/down-root/README.down-root
index d337ffe9..d337ffe9 100644
--- a/openvpn/src/plugins/down-root/README
+++ b/openvpn/src/plugins/down-root/README.down-root
diff --git a/openvpn/src/plugins/down-root/down-root.c b/openvpn/src/plugins/down-root/down-root.c
index fced23be..d51d0e55 100644
--- a/openvpn/src/plugins/down-root/down-root.c
+++ b/openvpn/src/plugins/down-root/down-root.c
@@ -26,6 +26,10 @@
* OpenVPN plugin module to do privileged down-script execution.
*/
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#include <stdio.h>
#include <string.h>
#include <unistd.h>
@@ -37,7 +41,7 @@
#include <signal.h>
#include <syslog.h>
-#include "openvpn-plugin.h"
+#include <openvpn-plugin.h>
#define DEBUG(verb) ((verb) >= 7)
diff --git a/openvpn/src/plugins/down-root/down-root.exports b/openvpn/src/plugins/down-root/down-root.exports
new file mode 100644
index 00000000..b07937cc
--- /dev/null
+++ b/openvpn/src/plugins/down-root/down-root.exports
@@ -0,0 +1,4 @@
+openvpn_plugin_open_v1
+openvpn_plugin_func_v1
+openvpn_plugin_close_v1
+openvpn_plugin_abort_v1