summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Sommerseth <dazo@users.sourceforge.net>2010-11-14 23:48:49 +0100
committerDavid Sommerseth <dazo@users.sourceforge.net>2010-11-14 23:48:49 +0100
commit4b519cf51d02daacb388eb90bd0c5930145d7a0d (patch)
treebb5427a758fe78816cdfdf19d05f0836fa68ac6a
parent513a53284158c6fe3b4c89b59eb10029639407b5 (diff)
parent423d68b0ede7f10c02fa753cba8d60d2218d2dc7 (diff)
downloadopenvpn-4b519cf51d02daacb388eb90bd0c5930145d7a0d.tar.gz
openvpn-4b519cf51d02daacb388eb90bd0c5930145d7a0d.tar.xz
openvpn-4b519cf51d02daacb388eb90bd0c5930145d7a0d.zip
Merge branch 'bugfix2.1' into beta2.2
Conflicts: options.c - Disagreements about a new included file (forward.h) Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
-rw-r--r--base64.c6
-rw-r--r--contrib/pull-resolv-conf/client.down5
-rw-r--r--contrib/pull-resolv-conf/client.up5
-rw-r--r--options.c1
4 files changed, 8 insertions, 9 deletions
diff --git a/base64.c b/base64.c
index 2cc3944..3449ae5 100644
--- a/base64.c
+++ b/base64.c
@@ -80,8 +80,6 @@ base64_encode(const void *data, int size, char **str)
return strlen(s);
}
-#if NTLM
-
static int
pos(char c)
{
@@ -137,8 +135,6 @@ base64_decode(const char *str, void *data)
return q - (unsigned char *) data;
}
-#endif /* NTLM, PKCS#11 */
-
#else
static void dummy(void) {}
-#endif
+#endif /* ENABLE_HTTP_PROXY, ENABLE_PKCS11, ENABLE_CLIENT_CR */
diff --git a/contrib/pull-resolv-conf/client.down b/contrib/pull-resolv-conf/client.down
index 38c585b..05f2d4d 100644
--- a/contrib/pull-resolv-conf/client.down
+++ b/contrib/pull-resolv-conf/client.down
@@ -34,9 +34,10 @@
# A horrid work around, from a security perspective,
# is to run OpenVPN as root. THIS IS NOT RECOMMENDED. You have
# been WARNED.
+PATH=/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin:/usr/local/sbin
-if [ -x /sbin/resolvconf ] ; then
- /sbin/resolvconf -d "${1}"
+if type resolvconf >/dev/null 2>&1; then
+ resolvconf -d "${1}" -f
elif [ -e /etc/resolv.conf.ovpnsave ] ; then
# cp + rm rather than mv in case it's a symlink
cp /etc/resolv.conf.ovpnsave /etc/resolv.conf
diff --git a/contrib/pull-resolv-conf/client.up b/contrib/pull-resolv-conf/client.up
index e81bd3a..b28d4d1 100644
--- a/contrib/pull-resolv-conf/client.up
+++ b/contrib/pull-resolv-conf/client.up
@@ -33,6 +33,7 @@
# A horrid work around, from a security perspective,
# is to run OpenVPN as root. THIS IS NOT RECOMMENDED. You have
# been WARNED.
+PATH=/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin:/usr/local/sbin
# init variables
@@ -86,8 +87,8 @@ fi
out="# resolv.conf autogenerated by ${0} (${1})${nl}${dns}${nl}${ds}${domains}"
# use resolvconf if it's available
-if [ -x /sbin/resolvconf ] ; then
- printf "%s\n" "${out}" | /sbin/resolvconf -a "${1}"
+if type resolvconf >/dev/null 2>&1; then
+ printf "%s\n" "${out}" | resolvconf -p -a "${1}"
else
# Preserve the existing resolv.conf
if [ -e /etc/resolv.conf ] ; then
diff --git a/options.c b/options.c
index 66b57d7..3aa6820 100644
--- a/options.c
+++ b/options.c
@@ -48,6 +48,7 @@
#include "pool.h"
#include "helper.h"
#include "manage.h"
+#include "forward.h"
#include "configure.h"
#include <ctype.h>