Hi, On Sun, Oct 11, 2015 at 11:52:17AM +0200, Adriaan de Jong wrote: > This patch allows inlining of the --auth-user-pass directive, so it is now > possible to do > > <auth-user-pass> > myusername > mypassword > </auth-user-pass> [..]
I still think that this is a useful patch, but it might need a rewrite, given that get_user_pass_cr() learned inline file handling in James' change commit c9a35a20812aafdacc3682a0379f52126bd567ae Author: James Yonan <ja...@openvpn.net> List-Post: openvpn-devel@lists.sourceforge.net Date: Thu Mar 3 01:19:05 2016 -0700 Added directive to specify HTTP proxy credentials in config. The inline directive http-proxy-user-pass can be used to specify proxy credentials in config, e.g.: (which adds INLINE_TAG handling to the general user/pass auth mechanism) > + if (options->auth_user_pass_file_inline) > + { > + int n_inlined = 0; > + const char *pos = options->auth_user_pass_file_inline; > + const char *prev = pos; > + > + if ( strlen(pos) == 0 ) > + msg (M_USAGE, "Invalid format for inlined --auth-user-pass"); > + > + while( (pos = strchr(pos, '\n')) != NULL ) > + { > + n_inlined++; > + > + if (n_inlined > 2) > + msg (M_USAGE, "Too many lines in inlined --auth-user-pass"); ... so this explicit handling is no longer needed, and should go to the general function (if possible). It also looks like a lot of code, compared to James' patch which does mostly the same thing for http-proxy-user-pass user/password... (but maybe this is just because the generic auth-user-pass stuff is called from many more places). gert -- USENET is *not* the non-clickable part of WWW! //www.muc.de/~gert/ Gert Doering - Munich, Germany g...@greenie.muc.de fax: +49-89-35655025 g...@net.informatik.tu-muenchen.de
signature.asc
Description: PGP signature