Browse code

Added warning when using chroot without specifying user and group.

git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@3069 e7ae566f-a301-0410-adde-c780ea21d3b5

james authored on 2008/07/18 05:47:12
Showing 1 changed files
... ...
@@ -1912,6 +1912,9 @@ do_option_warnings (struct context *c)
1912 1912
      msg (M_WARN, "WARNING: you are using user/group/chroot without persist-key -- this may cause restarts to fail");
1913 1913
    }
1914 1914
 
1915
+  if (o->chroot_dir && !(o->username && o->groupname))
1916
+    msg (M_WARN, "WARNING: you are using chroot without specifying user and group -- this may cause the chroot jail to be insecure");
1917
+
1915 1918
 #if P2MP
1916 1919
   if (o->pull && o->ifconfig_local && c->first_time)
1917 1920
     msg (M_WARN, "WARNING: using --pull/--client and --ifconfig together is probably not what you want");