On 29/10/12 20:35, David Sommerseth wrote: > From: David Sommerseth <dav...@redhat.com> > > This patch removes the support for the system() call, and enforces the usage > of execve() > on the *nix platform and CreateProcessW() on Windows. This is to enhance the > overall > security when calling external scripts. Using system() is prone to shell > expansions, > which may lead to security breaches. Which is also why the execve() approach > has > been the default since commit a82813527551f0e79c6d6ed5a9c1162e3c171bcf which > re-introduced the system() in Nov. 2008. > > After having asked on the mailing list and checked around on the IRC > channels, the > genereal consensus is that very few uses system() these days. > > The only annoyance I've been made aware of is that this will now require > adding a full > path to the script interpreter together with the script, and not just put in > the > script name alone. But to just use the script name in Windows, you had to > configure > --script-security with the 'system' flag earlier too. So my conclusion is > that it's > better to add a full path to the script interpreter in Windows and raise the > overal > security with OpenVPN, than to continue to have a possible potentially risky > OpenVPN configuration just to make life "easier" for Windows script users. > > Removal of the system() call, also solves a nasty bug related to the usage of > putenv() > on the *nix platforms. > > For more information please see: > http://thread.gmane.org/gmane.network.openvpn.devel/7090 > https://community.openvpn.net/openvpn/ticket/228 > > Trac-ticket: 228 > Signed-off-by: David Sommerseth <dav...@redhat.com> > --- > doc/openvpn.8 | 48 ++++++++++++------ > src/openvpn/init.c | 3 -- > src/openvpn/misc.c | 98 ++++++++----------------------------- > src/openvpn/misc.h | 5 -- > src/openvpn/options.c | 16 +----- > src/openvpn/platform.c | 27 +--------- > src/openvpn/platform.h | 4 +- > src/openvpn/win32.c | 127 > +++++++++++++----------------------------------- > 8 files changed, 89 insertions(+), 239 deletions(-) >
Applied to master and beta/2.3 commit 0563473601abfbf2142bfa0ca5b863c5aa7953a2 (master) commit 3cb9f1a62b4a84dbf4acd1957c900a5b06fd6ac2 (beta/2.3) Author: David Sommerseth <dav...@redhat.com> List-Post: openvpn-devel@lists.sourceforge.net Date: Thu Oct 25 14:22:30 2012 +0200 Remove the support for using system() when executing external programs or scripts Trac-ticket: 228 Signed-off-by: David Sommerseth <dav...@redhat.com> Acked-by: Gert Doering <g...@greenie.muc.de> Message-Id: <1351539352-17371-1-git-send-email-d...@users.sourceforge.net> URL: http://article.gmane.org/gmane.network.openvpn.devel/7114 (cherry picked from commit 0563473601abfbf2142bfa0ca5b863c5aa7953a2) kind regards, David Sommerseth
signature.asc
Description: OpenPGP digital signature