]> git.ipfire.org Git - thirdparty/openvpn.git/commit
Fail if options have extra parameters [v2]
authorJonathan K. Bullard <jkbullard@gmail.com>
Tue, 2 Jun 2015 12:43:26 +0000 (08:43 -0400)
committerGert Doering <gert@greenie.muc.de>
Sun, 21 Jun 2015 12:56:24 +0000 (14:56 +0200)
commit3d6a4cded2b20fb816b17d70eb65cd6c14a95eff
tree9f0edd43172bbd103082447d98f377c00a62389e
parent659eae7b79e5565bb0c93f6d6d04e2163fea1141
Fail if options have extra parameters [v2]

Throw an error if an option has extra parameters; previously they
were silently ignored (see also trac #557)

This feature was discussed on the openvpn-devel mailing list
(http://thread.gmane.org/gmane.network.openvpn.devel/9599).

The (modified) message "Unrecognized option or missing or extra
parameter(s)" is used except for a few options:

 * The --help option: An extra parameter for --help generates a
   specific error message after showing the syntax message. This
   is done to help a user who tries "--help tls-cipher" or similar,
   hoping to get more information about the "tls-cipher" option.

 * The --dhcp-option option: It has its own similar message, into
   which " or extra" has been inserted.

 * Ten options such as --up that accept a command (instead of a
   path) already detect extra parameters and generate specific
   error messages that mention double-quoting commands which
   contain embedded spaces.

Acked-by: Arne Schwabe <arne@rfc2549.org>
Message-Id: <CAEsd45RvRfmqetu-EoFjSdyBk5F9X1K5muPGu-+_+30TMNOU_A@mail.gmail.com>
URL: http://article.gmane.org/gmane.network.openvpn.devel/9783
URL: https://community.openvpn.net/openvpn/ticket/557

Signed-off-by: Gert Doering <gert@greenie.muc.de>
src/openvpn/options.c