summaryrefslogtreecommitdiffstats
path: root/route.c
diff options
context:
space:
mode:
authorjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>2008-01-21 19:34:13 +0000
committerjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>2008-01-21 19:34:13 +0000
commit0aee9ca7e76887fb5752c15ef63bfb7a356df06e (patch)
treebd7db9d2c4e4ef4d2cedfdef961208ebd680c2f0 /route.c
parent7686b1c407f8e78d24669971219f9bc253521744 (diff)
downloadopenvpn-0aee9ca7e76887fb5752c15ef63bfb7a356df06e.tar.gz
openvpn-0aee9ca7e76887fb5752c15ef63bfb7a356df06e.tar.xz
openvpn-0aee9ca7e76887fb5752c15ef63bfb7a356df06e.zip
Allow OpenVPN to run completely unprivileged under Linux
by allowing openvpn --mktun to be used with --user and --group to set the UID/GID of the tun device node. Also added --iproute option to allow an alternative command to be executed in place of the default iproute2 command (Alon Bar-Lev). git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@2639 e7ae566f-a301-0410-adde-c780ea21d3b5
Diffstat (limited to 'route.c')
-rw-r--r--route.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/route.c b/route.c
index 36d41cd..507ef38 100644
--- a/route.c
+++ b/route.c
@@ -777,7 +777,8 @@ add_route (struct route *r, const struct tuntap *tt, unsigned int flags, const s
#if defined(TARGET_LINUX)
#ifdef CONFIG_FEATURE_IPROUTE
- buf_printf (&buf, IPROUTE_PATH " route add %s/%d via %s",
+ buf_printf (&buf, "%s route add %s/%d via %s",
+ iproute_path,
network,
count_netmask_bits(netmask),
gateway);
@@ -934,7 +935,8 @@ delete_route (const struct route *r, const struct tuntap *tt, unsigned int flags
#if defined(TARGET_LINUX)
#ifdef CONFIG_FEATURE_IPROUTE
- buf_printf (&buf, IPROUTE_PATH " route del %s/%d",
+ buf_printf (&buf, "%s route del %s/%d",
+ iproute_path,
network,
count_netmask_bits(netmask));
#else