[Pkg-samba-maint] [samba] 04/08: Sync PIDL with 3.6.26

Andrew Bartlett abartlet-guest at moszumanska.debian.org
Wed Apr 13 01:33:24 UTC 2016


This is an automated email from the git hooks/post-receive script.

abartlet-guest pushed a commit to branch wheezy
in repository samba.

commit 1a8851bfd9acf788b32a2c15184ded00c5bda37e
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Mon Apr 11 13:10:52 2016 +1200

    Sync PIDL with 3.6.26
    
    This ensures we build with the same PIDL the security patches were
    generated with, and can rebuild this package against a modern GCC
    if needed (4.8).
    
    Signed-off-by: Andrew Bartlett <abartlet at samba.org>
---
 ...arsing-linemarkers-in-preprocessor-output.patch | 64 ++++++++++++++++++++++
 .../0001-pidl-Add-skip-option-to-elements.patch    | 63 +++++++++++++++++++++
 debian/patches/series                              |  2 +
 3 files changed, 129 insertions(+)

diff --git a/debian/patches/0001-PIDL-fix-parsing-linemarkers-in-preprocessor-output.patch b/debian/patches/0001-PIDL-fix-parsing-linemarkers-in-preprocessor-output.patch
new file mode 100644
index 0000000..542ed52
--- /dev/null
+++ b/debian/patches/0001-PIDL-fix-parsing-linemarkers-in-preprocessor-output.patch
@@ -0,0 +1,64 @@
+From b07ade6e6fcc8b844cf1fb8b6038617281c4c2d0 Mon Sep 17 00:00:00 2001
+From: Alexander Bokovoy <ab at samba.org>
+Date: Wed, 6 Feb 2013 10:17:57 +0200
+Subject: [PATCH] PIDL: fix parsing linemarkers in preprocessor output
+
+When PIDL calls out to C preprocessor to expand IDL files
+and parse the output, it filters out linemarkers and line control
+information as described in http://gcc.gnu.org/onlinedocs/cpp/Preprocessor-Output.html
+and http://gcc.gnu.org/onlinedocs/cpp/Line-Control.html#Line-Control
+
+With gcc 4.8 stdc-predef.h is included automatically and linemarker for the
+file has extended flags that PIDL couldn't parse ('system header that needs to
+be extern "C" protected for C++')
+
+Thanks to Jakub Jelinek <jakub at redhat.com> for explanation of the linemarker format.
+
+Fixes https://bugzilla.redhat.com/show_bug.cgi?id=906517
+
+Reviewed-by: Andreas Schneider <asn at samba.org>
+(cherry picked from commit 6ba7ab5c14801aecae96373d5a9db7ab82957526)
+
+Signed-off-by: Andreas Schneider <asn at samba.org>
+
+Fix bug #9636 - pidl can't parse new linemarkers in preprocessor output.
+(cherry picked from commit 643571470f2e4cd2f58bd60ac7189abb826d33cc)
+(cherry picked from commit b5a8afd6550e9091d169d3010751913bb483fc4b)
+---
+ pidl/idl.yp                | 4 +++-
+ pidl/lib/Parse/Pidl/IDL.pm | 4 +++-
+ 2 files changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/pidl/idl.yp b/pidl/idl.yp
+index b5c5185..c8a65f6 100644
+--- a/pidl/idl.yp
++++ b/pidl/idl.yp
+@@ -610,7 +610,9 @@ again:
+ 
+ 	for ($parser->YYData->{INPUT}) {
+ 		if (/^\#/) {
+-			if (s/^\# (\d+) \"(.*?)\"( \d+|)//) {
++			# Linemarker format is described at
++			# http://gcc.gnu.org/onlinedocs/cpp/Preprocessor-Output.html
++			if (s/^\# (\d+) \"(.*?)\"(( \d+){1,4}|)//) {
+ 				$parser->YYData->{LINE} = $1-1;
+ 				$parser->YYData->{FILE} = $2;
+ 				goto again;
+diff --git a/pidl/lib/Parse/Pidl/IDL.pm b/pidl/lib/Parse/Pidl/IDL.pm
+index d4820ff..6927c89 100644
+--- a/pidl/lib/Parse/Pidl/IDL.pm
++++ b/pidl/lib/Parse/Pidl/IDL.pm
+@@ -2576,7 +2576,9 @@ again:
+ 
+ 	for ($parser->YYData->{INPUT}) {
+ 		if (/^\#/) {
+-			if (s/^\# (\d+) \"(.*?)\"( \d+|)//) {
++			# Linemarker format is described at
++			# http://gcc.gnu.org/onlinedocs/cpp/Preprocessor-Output.html
++			if (s/^\# (\d+) \"(.*?)\"(( \d+){1,4}|)//) {
+ 				$parser->YYData->{LINE} = $1-1;
+ 				$parser->YYData->{FILE} = $2;
+ 				goto again;
+-- 
+2.8.0.rc3
+
diff --git a/debian/patches/0001-pidl-Add-skip-option-to-elements.patch b/debian/patches/0001-pidl-Add-skip-option-to-elements.patch
new file mode 100644
index 0000000..cb68c91
--- /dev/null
+++ b/debian/patches/0001-pidl-Add-skip-option-to-elements.patch
@@ -0,0 +1,63 @@
+From 3395375c06ef7911da1934cf4e3d88de2b7b72bd Mon Sep 17 00:00:00 2001
+From: Andreas Schneider <asn at samba.org>
+Date: Tue, 12 Mar 2013 11:36:38 +0100
+Subject: [PATCH] pidl: Add skip option to elements.
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+This option allows to skip struct elements in pull and push function.
+This can be used to pass flags to the structure e.g. for string values.
+
+Reviewed-by: Günther Deschner <gd at samba.org>
+(cherry picked from commit 7f13e139825a4363d8d304c5b86c805bb2a1b0db)
+---
+ pidl/lib/Parse/Pidl/NDR.pm               |  1 +
+ pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm | 12 ++++++++++--
+ 2 files changed, 11 insertions(+), 2 deletions(-)
+
+diff --git a/pidl/lib/Parse/Pidl/NDR.pm b/pidl/lib/Parse/Pidl/NDR.pm
+index 71e7228..c4cef64 100644
+--- a/pidl/lib/Parse/Pidl/NDR.pm
++++ b/pidl/lib/Parse/Pidl/NDR.pm
+@@ -1070,6 +1070,7 @@ my %property_list = (
+ 	"noprint"		=> ["FUNCTION", "TYPEDEF", "STRUCT", "UNION", "ENUM", "BITMAP", "ELEMENT", "PIPE"],
+ 	"nopython"		=> ["FUNCTION", "TYPEDEF", "STRUCT", "UNION", "ENUM", "BITMAP"],
+ 	"todo"			=> ["FUNCTION"],
++	"skip"			=> ["ELEMENT"],
+ 
+ 	# union
+ 	"switch_is"		=> ["ELEMENT"],
+diff --git a/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm b/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
+index 3676d6d..10a886a 100644
+--- a/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
++++ b/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
+@@ -924,7 +924,11 @@ sub ParseDataPull($$$$$$$)
+ 
+ 		$var_name = get_pointer_to($var_name);
+ 
+-		$self->pidl("NDR_CHECK(".TypeFunctionName("ndr_pull", $l->{DATA_TYPE})."($ndr, $ndr_flags, $var_name));");
++		if (has_property($e, "skip")) {
++			$self->pidl("/* [skip] '$var_name' */");
++		} else {
++			$self->pidl("NDR_CHECK(".TypeFunctionName("ndr_pull", $l->{DATA_TYPE})."($ndr, $ndr_flags, $var_name));");
++		}
+ 
+ 		my $pl = GetPrevLevel($e, $l);
+ 
+@@ -962,7 +966,11 @@ sub ParseDataPush($$$$$$$)
+ 			$var_name = get_pointer_to($var_name);
+ 		}
+ 
+-		$self->pidl("NDR_CHECK(".TypeFunctionName("ndr_push", $l->{DATA_TYPE})."($ndr, $ndr_flags, $var_name));");
++		if (has_property($e, "skip")) {
++			$self->pidl("/* [skip] '$var_name' */");
++		} else {
++			$self->pidl("NDR_CHECK(".TypeFunctionName("ndr_push", $l->{DATA_TYPE})."($ndr, $ndr_flags, $var_name));");
++		}
+ 	} else {
+ 		$self->ParseTypePush($l->{DATA_TYPE}, $ndr, $var_name, $primitives, $deferred);
+ 	}
+-- 
+2.8.0.rc3
+
diff --git a/debian/patches/series b/debian/patches/series
index f67b916..c5131ed 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -46,3 +46,5 @@ CVE-2016-2112-v3-6.patch
 CVE-2016-2115-v3-6.patch
 CVE-2016-2118-v3-6.patch
 CVE-2015-5370-v3-6.patch
+0001-pidl-Add-skip-option-to-elements.patch
+0001-PIDL-fix-parsing-linemarkers-in-preprocessor-output.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-samba/samba.git




More information about the Pkg-samba-maint mailing list