The branch, master has been updated via d26016c19854142c1e5fbb5a3bfc40e7e4b1c616 (commit) via 33347d783aa5aaae3eb90777b06412cbb2cbeca3 (commit) from a44030fc10217940c94a927c3d0988648058e0e2 (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log ----------------------------------------------------------------- commit d26016c19854142c1e5fbb5a3bfc40e7e4b1c616 Author: ronnie sahlberg <ronniesahlb...@gmail.com> Date: Tue Oct 6 17:49:59 2009 +1100 PIDL fix for using external types with wireshark backend List, Please review this patch to pidl. Basically, we need to process the wireshark conformance file BEFORE we process the idl file since this file may define external types and set the alignment for them (using the TYPE directive). Otherwise pidl will default all external types to use 4byte alignment which breaks (much more often) on NDR64 regards ronnie sahlberg From 8f86903fc353d0906bd82e72ce19c5af09beb001 Mon Sep 17 00:00:00 2001 From: Ronnie Sahlberg <ronniesahlb...@gmail.com> Date: Mon, 5 Oct 2009 15:22:43 +1100 Subject: [PATCH] In the PIDL wireshark backend, we define external types in the conformance file using the TYPE directive. If we declare external types here, we must parse this file before we process the IDL file, or else these external types will all default to 4byte padding (pidl assumes all unknown types are 4byte aligned). Make sure we read the conformance file and create these new types before we parse the idl file. Signed-off-by: Ronnie Sahlberg <ronniesahlb...@gmail.com> commit 33347d783aa5aaae3eb90777b06412cbb2cbeca3 Author: Andrew Tridgell <tri...@samba.org> Date: Tue Oct 6 19:05:15 2009 +1100 s4-provision: match win2003 functional level We are now defaulting to win2003 functional level, and see to report the right revisions of our db and schema ----------------------------------------------------------------------- Summary of changes: pidl/lib/Parse/Pidl/NDR.pm | 2 ++ pidl/lib/Parse/Pidl/Wireshark/Conformance.pm | 12 ++++++++++++ pidl/lib/Parse/Pidl/Wireshark/NDR.pm | 4 ++-- pidl/pidl | 13 ++++++++++++- source4/setup/provision.ldif | 2 +- source4/setup/provision_configuration.ldif | 4 ++-- source4/setup/provision_schema_basedn_modify.ldif | 2 +- 7 files changed, 32 insertions(+), 7 deletions(-) Changeset truncated at 500 lines: diff --git a/pidl/lib/Parse/Pidl/NDR.pm b/pidl/lib/Parse/Pidl/NDR.pm index 7c0f7bb..48a4ccb 100644 --- a/pidl/lib/Parse/Pidl/NDR.pm +++ b/pidl/lib/Parse/Pidl/NDR.pm @@ -406,6 +406,8 @@ sub align_type($) if ($dt->{TYPE} eq "TYPEDEF") { return align_type($dt->{DATA}); + } elsif ($dt->{TYPE} eq "CONFORMANCE") { + return $dt->{DATA}->{ALIGN}; } elsif ($dt->{TYPE} eq "ENUM") { return align_type(Parse::Pidl::Typelist::enum_type_fn($dt)); } elsif ($dt->{TYPE} eq "BITMAP") { diff --git a/pidl/lib/Parse/Pidl/Wireshark/Conformance.pm b/pidl/lib/Parse/Pidl/Wireshark/Conformance.pm index 5c37b4a..1dec647 100644 --- a/pidl/lib/Parse/Pidl/Wireshark/Conformance.pm +++ b/pidl/lib/Parse/Pidl/Wireshark/Conformance.pm @@ -110,6 +110,7 @@ use strict; use Parse::Pidl qw(fatal warning error); use Parse::Pidl::Util qw(has_property); +use Parse::Pidl::Typelist qw(addType); sub handle_type($$$$$$$$$$) { @@ -149,6 +150,17 @@ sub handle_type($$$$$$$$$$) VALSSTRING => $valsstring, ALIGNMENT => $alignment }; + + addType({ + NAME => $name, + TYPE => "CONFORMANCE", + BASEFILE => "conformance file", + DATA => { + NAME => $name, + TYPE => "CONFORMANCE", + ALIGN => $alignment + } + }); } sub handle_tfs($$$$$) diff --git a/pidl/lib/Parse/Pidl/Wireshark/NDR.pm b/pidl/lib/Parse/Pidl/Wireshark/NDR.pm index a9ad555..e13e144 100644 --- a/pidl/lib/Parse/Pidl/Wireshark/NDR.pm +++ b/pidl/lib/Parse/Pidl/Wireshark/NDR.pm @@ -1,5 +1,5 @@ ################################################## -# Samba4 NDR parser generator for IDL structures +# Wireshark NDR parser generator for IDL structures # Copyright tri...@samba.org 2000-2003 # Copyright t...@samba.org 2001,2005 # Copyright jel...@samba.org 2004-2007 @@ -895,7 +895,7 @@ sub Initialize($$) sub Parse($$$$$) { my($self,$ndr,$idl_file,$h_filename,$cnf_file) = @_; - + $self->Initialize($cnf_file); return (undef, undef) if defined($self->{conformance}->{noemit_dissector}); diff --git a/pidl/pidl b/pidl/pidl index bc0bb35..d0623a0 100755 --- a/pidl/pidl +++ b/pidl/pidl @@ -653,7 +653,18 @@ sub process_file($) $pidl = Parse::Pidl::ODL::ODL2IDL($pidl, dirname($idl_file), \...@opt_incdirs); - if (defined($opt_ws_parser) or + if (defined($opt_ws_parser)) { + require Parse::Pidl::Wireshark::NDR; + + my $cnffile = $idl_file; + $cnffile =~ s/\.idl$/\.cnf/; + + my $generator = new Parse::Pidl::Wireshark::NDR(); + $generator->Initialize($cnffile); + } + + + if (defined($opt_ws_parser) or defined($opt_client) or defined($opt_server) or defined($opt_header) or diff --git a/source4/setup/provision.ldif b/source4/setup/provision.ldif index f7ab438..395d404 100644 --- a/source4/setup/provision.ldif +++ b/source4/setup/provision.ldif @@ -140,7 +140,7 @@ objectClass: container dn: CN=ActiveDirectoryUpdate,CN=DomainUpdates,CN=System,${DOMAINDN} objectClass: top objectClass: container -revision: 3 +revision: 5 dn: CN=Operations,CN=DomainUpdates,CN=System,${DOMAINDN} objectClass: top diff --git a/source4/setup/provision_configuration.ldif b/source4/setup/provision_configuration.ldif index 3032388..0716345 100644 --- a/source4/setup/provision_configuration.ldif +++ b/source4/setup/provision_configuration.ldif @@ -650,12 +650,12 @@ objectClass: container dn: CN=ActiveDirectoryRodcUpdate,CN=ForestUpdates,${CONFIGDN} objectClass: top objectClass: container -revision: 2 +revision: 5 dn: CN=ActiveDirectoryUpdate,CN=ForestUpdates,${CONFIGDN} objectClass: top objectClass: container -revision: 2 +revision: 5 dn: CN=Operations,CN=ForestUpdates,${CONFIGDN} objectClass: top diff --git a/source4/setup/provision_schema_basedn_modify.ldif b/source4/setup/provision_schema_basedn_modify.ldif index 6062688..93266db 100644 --- a/source4/setup/provision_schema_basedn_modify.ldif +++ b/source4/setup/provision_schema_basedn_modify.ldif @@ -6,5 +6,5 @@ changetype: modify - # "masteredBy", "msDs-masteredBy" filled in later replace: objectVersion -objectVersion: 44 +objectVersion: 47 -- Samba Shared Repository