Global options not properly inherited by virtual hosts
Several recent fixes have addressed similar issues with vhost option handling (see #612 (closed) for udp-port option and #480 (closed) for device option). However, this problem still persists with other configuration options.
For example, if chroot-dir is set in the global section but omitted in a virtual host, ocserv will complain that it cannot open AnyConnect XML profile and refuse to start. If this option is specified in the virtual host, it works, but you will get a warning that the option is ignored in vhost.
Similarly, if a custom ban_points_wrong_password value is set globally but omitted in a virtual host, ocserv falls back to built-in default value for this option. Again, specifying this option in the virtual host works but triggers the "option ignored" warning.
Currently, to achieve consistent behavior with virtual hosts, you must duplicate all global options in each virtual host section. While this works, it is not ideal because it creates unnecessary configuration duplication and generates numerous "option ignored on vhost" warnings on every user connection.
These global options are initialized both in check_cfg() and in WARN_ON_VHOST macro. When an option is not explicitly specified in a virtual host, it remains uninitialized rather than inheriting the global value.
Proposed solution is to factor out the initialization of such global options into a separate function and call it immediately after creating a new virtual host. This would ensure all global settings are properly copied from the default virtual host. Also update config.sample to document which options are global and cannot be overridden in virtual hosts.
I will prepare a MR for this. Feedback and suggestions are welcome.