From 3e6cb51e2028481f1c0dc245c531e4a8b7a644f4 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sat, 16 Feb 2008 19:37:03 +0100 Subject: Properly escape quotes in init functions. (This used to be commit 0efa80f30b4f3287a204af450a43dcdfa9baad8a) --- source4/build/smb_build/makefile.pm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/source4/build/smb_build/makefile.pm b/source4/build/smb_build/makefile.pm index d782ec6300..d8780573b6 100644 --- a/source4/build/smb_build/makefile.pm +++ b/source4/build/smb_build/makefile.pm @@ -116,7 +116,11 @@ sub Integrated($$) $self->_prepare_list($ctx, "OBJ_LIST"); $self->output("$ctx->{SUBSYSTEM}_OBJ_LIST += \$($ctx->{NAME}_OBJ_LIST)\n"); - $self->output("$ctx->{SUBSYSTEM}_INIT_FUNCTIONS += \"$ctx->{INIT_FUNCTION},\"\n") if defined($ctx->{INIT_FUNCTION}); + if(defined($ctx->{INIT_FUNCTION})) { + my $init_fn = $ctx->{INIT_FUNCTION}; + $init_fn =~ s/"/\\\"/g; + $self->output("$ctx->{SUBSYSTEM}_INIT_FUNCTIONS += \"$init_fn,\"\n"); + } } sub SharedModulePrimitives($$) -- cgit