Re: [Openvpn-devel] [PATCH 1/4] re-implement argv_printf_*()

2020-02-12 Thread Arne Schwabe
Am 06.02.20 um 14:21 schrieb David Sommerseth:
> From: Heiko Hund 
> 
> The previous implementation had the problem that it was not fully
> compatible with printf() and could only detect % format directives
> following a space character (0x20).
> 
> It modifies the format string and inserts marks to separate groups
> before passing it to the regular printf in libc. The marks are
> later used to separate the output string into individual command
> line arguments.
> 
> The choice of 0x1D as the argument delimiter is based on the
> assumption that no "regular" string passed to argv_printf_*() will
> ever have to contain that byte (and the fact that it actually is
> the ASCII "group separator" control character, which fits its
> purpose).
> 
> This commit has been updated by David Sommerseth based on Arne
> Schwabe and his own feedback on the mailing list.
> 

Acked-By: Arne Schwabe 



signature.asc
Description: OpenPGP digital signature
___
Openvpn-devel mailing list
Openvpn-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openvpn-devel


Re: [Openvpn-devel] [PATCH 1/4] re-implement argv_printf_*()

2020-01-19 Thread Gert Doering
Hi,

On Sun, Jan 19, 2020 at 04:51:08PM +0100, Gert Doering wrote:
> David, shall I just amend the patch, or do you want to resend a v3?
> 
> (The other 3 of the set should be fine, as they do not touch tun.c)

Not exactly correct, 2/4 renames all argv_reset() calls to argv_free(),
so that *might* need adjustment for tun.c as well.  But these are 
similarily trivial, and if not done completely, will result in link
failures (so, easy enough, provided I compile on all platforms).

gert

-- 
"If was one thing all people took for granted, was conviction that if you 
 feed honest figures into a computer, honest figures come out. Never doubted 
 it myself till I met a computer with a sense of humor."
 Robert A. Heinlein, The Moon is a Harsh Mistress

Gert Doering - Munich, Germany g...@greenie.muc.de


signature.asc
Description: PGP signature
___
Openvpn-devel mailing list
Openvpn-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openvpn-devel


Re: [Openvpn-devel] [PATCH 1/4] re-implement argv_printf_*()

2020-01-19 Thread Gert Doering
Hi,

On Fri, Oct 04, 2019 at 07:12:43PM +0200, David Sommerseth wrote:
> From: Heiko Hund 
> 
> The previous implementation had the problem that it was not fully
> compatible with printf() and could only detect % format directives
> following a space character (0x20).

Events have overtaken this one.

Namely, tun.c has been changed in many places due to the windows
refactoring / wintun work by Lev and Simon, so this patch does not
apply "as is" anymore.

The changes to tun.c are trivial ("%s%sc" --> "%s%s"), but according to
custom, I do not do code changes while applying - at least not without
asking :-)

David, shall I just amend the patch, or do you want to resend a v3?

(The other 3 of the set should be fine, as they do not touch tun.c)

gert
-- 
"If was one thing all people took for granted, was conviction that if you 
 feed honest figures into a computer, honest figures come out. Never doubted 
 it myself till I met a computer with a sense of humor."
 Robert A. Heinlein, The Moon is a Harsh Mistress

Gert Doering - Munich, Germany g...@greenie.muc.de


signature.asc
Description: PGP signature
___
Openvpn-devel mailing list
Openvpn-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openvpn-devel


Re: [Openvpn-devel] [PATCH 1/4] re-implement argv_printf_*()

2018-10-24 Thread David Sommerseth
On 19/10/18 17:56, David Sommerseth wrote:
> From: Heiko Hund 
> 
> The previous implementation had the problem that it was not fully
> compatible with printf() and could only detect % format directives
> following a space character (0x20).
> 
> It modifies the format string and inserts marks to separate groups
> before passing it to the regular printf in libc. The marks are
> later used to separate the output string into individual command
> line arguments.
> 
> The choice of 0x1D as the argument delimiter is based on the
> assumption that no "regular" string passed to argv_printf_*() will
> ever have to contain that byte (and the fact that it actually is
> the ASCII "group separator" control character, which fits its
> purpose).
> 
> This commit has been updated by David Sommerseth based on his feedback
> on the mailing list discussions earlier on.
> 
> Signed-off-by: Heiko Hund 
> Signed-off-by: David Sommerseth 
> ---
>  src/openvpn/argv.c   | 266 ---
>  src/openvpn/argv.h   |   4 +-
>  src/openvpn/route.c  |   8 +-
>  src/openvpn/tun.c|  24 +--
>  tests/unit_tests/openvpn/test_argv.c |  58 +-
>  5 files changed, 192 insertions(+), 168 deletions(-)

This is a rebase of [0,1] on top of git master 2b15c11716e0d.  I've added my
review suggestions directly to this commit, as can be found here [2].  The
doxygen suggestion is coming as the last patch in this patch-set.

[0] 
[1]

[2]



-- 
kind regards,

David Sommerseth
OpenVPN Inc




signature.asc
Description: OpenPGP digital signature
___
Openvpn-devel mailing list
Openvpn-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openvpn-devel