[SCM] Samba Shared Repository - branch master updated

Günther Deschner gd at samba.org
Fri Jul 24 14:45:03 UTC 2015


The branch, master has been updated
       via  adbd6d3 pidl: merge multiple 'genpad' implementations into one.
       via  3d0b23d vfs: fix build warning in smb traffic analyzer.
       via  2443c34 s4-torture: don't build the lsa forest trust krb5 tests when building with MIT Kerberos.
      from  c596ac6 install_with_python: Secure Python download with sha256 checks.

https://git.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit adbd6d32531a339046a2bcf73d3f22ee34d7184b
Author: Günther Deschner <gd at samba.org>
Date:   Wed Jul 22 18:57:57 2015 +0200

    pidl: merge multiple 'genpad' implementations into one.
    
    Guenther
    
    Signed-off-by: Günther Deschner <gd at samba.org>
    Reviewed-by: Andreas Schneider <asn at samba.org>
    
    Autobuild-User(master): Günther Deschner <gd at samba.org>
    Autobuild-Date(master): Fri Jul 24 16:44:16 CEST 2015 on sn-devel-104

commit 3d0b23dbd443381be1f265305ddda5434c0580aa
Author: Günther Deschner <gd at samba.org>
Date:   Wed Jul 22 14:52:06 2015 +0200

    vfs: fix build warning in smb traffic analyzer.
    
    Guenther
    
    Signed-off-by: Günther Deschner <gd at samba.org>
    Reviewed-by: Andreas Schneider <asn at samba.org>

commit 2443c34c91035778c36cc0eb4e51e9e922aeea1b
Author: Günther Deschner <gd at samba.org>
Date:   Fri Jul 10 09:44:40 2015 +0200

    s4-torture: don't build the lsa forest trust krb5 tests when building with MIT Kerberos.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=11411
    
    Guenther
    
    Signed-off-by: Günther Deschner <gd at samba.org>
    Reviewed-by: Andreas Schneider <asn at samba.org>

-----------------------------------------------------------------------

Summary of changes:
 pidl/lib/Parse/Pidl/Samba3/ClientNDR.pm    | 11 +----------
 pidl/lib/Parse/Pidl/Samba3/Template.pm     | 11 ++---------
 pidl/lib/Parse/Pidl/Samba4/NDR/Client.pm   | 11 +----------
 pidl/lib/Parse/Pidl/Samba4/Template.pm     | 11 ++---------
 pidl/lib/Parse/Pidl/Util.pm                | 16 +++++++++++++++-
 source3/modules/vfs_smb_traffic_analyzer.c |  4 ++--
 source3/modules/wscript_build              |  1 -
 source4/torture/rpc/lsa.c                  | 11 +++++++++++
 8 files changed, 34 insertions(+), 42 deletions(-)


Changeset truncated at 500 lines:

diff --git a/pidl/lib/Parse/Pidl/Samba3/ClientNDR.pm b/pidl/lib/Parse/Pidl/Samba3/ClientNDR.pm
index aa913f1..28d5245 100644
--- a/pidl/lib/Parse/Pidl/Samba3/ClientNDR.pm
+++ b/pidl/lib/Parse/Pidl/Samba3/ClientNDR.pm
@@ -13,7 +13,7 @@ use Exporter;
 
 use strict;
 use Parse::Pidl qw(fatal warning error);
-use Parse::Pidl::Util qw(has_property ParseExpr);
+use Parse::Pidl::Util qw(has_property ParseExpr genpad);
 use Parse::Pidl::NDR qw(ContainsPipe);
 use Parse::Pidl::Typelist qw(mapTypeName);
 use Parse::Pidl::Samba4 qw(DeclLong);
@@ -28,15 +28,6 @@ sub pidl($$) { my ($self,$txt) = @_; $self->{res} .= $txt ? "$self->{tabs}$txt\n
 sub pidl_hdr($$) { my ($self, $txt) = @_; $self->{res_hdr} .= "$txt\n"; } 
 sub fn_declare($$) { my ($self,$n) = @_; $self->pidl($n); $self->pidl_hdr("$n;"); }
 
-sub genpad($)
-{
-	my ($s) = @_;
-	my $nt = int((length($s)+1)/8);
-	my $lt = ($nt*8)-1;
-	my $ns = (length($s)-$lt);
-	return "\t"x($nt)." "x($ns);
-}
-
 sub new($)
 {
 	my ($class) = shift;
diff --git a/pidl/lib/Parse/Pidl/Samba3/Template.pm b/pidl/lib/Parse/Pidl/Samba3/Template.pm
index 3496927..4750cef 100644
--- a/pidl/lib/Parse/Pidl/Samba3/Template.pm
+++ b/pidl/lib/Parse/Pidl/Samba3/Template.pm
@@ -8,19 +8,12 @@ package Parse::Pidl::Samba3::Template;
 use vars qw($VERSION);
 $VERSION = '0.01';
 
+use Parse::Pidl::Util qw(genpad);
+
 use strict;
 
 my($res);
 
-sub genpad($)
-{
-	my ($s) = @_;
-	my $nt = int((length($s)+1)/8);
-	my $lt = ($nt*8)-1;
-	my $ns = (length($s)-$lt);
-	return "\t"x($nt)." "x($ns);
-}
-
 #####################################################################
 # produce boilerplate code for a interface
 sub Template($)
diff --git a/pidl/lib/Parse/Pidl/Samba4/NDR/Client.pm b/pidl/lib/Parse/Pidl/Samba4/NDR/Client.pm
index ee68090..040cd5a 100644
--- a/pidl/lib/Parse/Pidl/Samba4/NDR/Client.pm
+++ b/pidl/lib/Parse/Pidl/Samba4/NDR/Client.pm
@@ -11,7 +11,7 @@ use Exporter;
 @EXPORT_OK = qw(Parse);
 
 use Parse::Pidl qw(fatal warning error);
-use Parse::Pidl::Util qw(has_property ParseExpr);
+use Parse::Pidl::Util qw(has_property ParseExpr genpad);
 use Parse::Pidl::NDR qw(ContainsPipe);
 use Parse::Pidl::Typelist qw(mapTypeName);
 use Parse::Pidl::Samba4 qw(choose_header is_intree DeclLong);
@@ -29,15 +29,6 @@ sub pidl_hdr($$) { my ($self, $txt) = @_; $self->{res_hdr} .= "$txt\n"; }
 sub pidl_both($$) { my ($self, $txt) = @_; $self->{hdr} .= "$txt\n"; $self->{res_hdr} .= "$txt\n"; }
 sub fn_declare($$) { my ($self,$n) = @_; $self->pidl($n); $self->pidl_hdr("$n;"); }
 
-sub genpad($)
-{
-	my ($s) = @_;
-	my $nt = int((length($s)+1)/8);
-	my $lt = ($nt*8)-1;
-	my $ns = (length($s)-$lt);
-	return "\t"x($nt)." "x($ns);
-}
-
 sub new($)
 {
 	my ($class) = shift;
diff --git a/pidl/lib/Parse/Pidl/Samba4/Template.pm b/pidl/lib/Parse/Pidl/Samba4/Template.pm
index e79af85..d9fb304 100644
--- a/pidl/lib/Parse/Pidl/Samba4/Template.pm
+++ b/pidl/lib/Parse/Pidl/Samba4/Template.pm
@@ -8,19 +8,12 @@ package Parse::Pidl::Samba4::Template;
 use vars qw($VERSION);
 $VERSION = '0.01';
 
+use Parse::Pidl::Util qw(genpad);
+
 use strict;
 
 my($res);
 
-sub genpad($)
-{
-	my ($s) = @_;
-	my $nt = int((length($s)+1)/8);
-	my $lt = ($nt*8)-1;
-	my $ns = (length($s)-$lt);
-	return "\t"x($nt)." "x($ns);
-}
-
 #####################################################################
 # produce boilerplate code for a interface
 sub Template($)
diff --git a/pidl/lib/Parse/Pidl/Util.pm b/pidl/lib/Parse/Pidl/Util.pm
index 421cb8f..83e2393 100644
--- a/pidl/lib/Parse/Pidl/Util.pm
+++ b/pidl/lib/Parse/Pidl/Util.pm
@@ -6,7 +6,7 @@ package Parse::Pidl::Util;
 
 require Exporter;
 @ISA = qw(Exporter);
- at EXPORT = qw(has_property property_matches ParseExpr ParseExprExt is_constant make_str unmake_str print_uuid MyDumper);
+ at EXPORT = qw(has_property property_matches ParseExpr ParseExprExt is_constant make_str unmake_str print_uuid MyDumper genpad);
 use vars qw($VERSION);
 $VERSION = '0.01';
 
@@ -176,6 +176,20 @@ sub ParseExprExt($$$$$)
 		$deref, $use);
 }
 
+=item B<genpad>
+return an empty string consisting of tabs and spaces suitable for proper indent
+of C-functions.
+
+=cut
+sub genpad($)
+{
+	my ($s) = @_;
+	my $nt = int((length($s)+1)/8);
+	my $lt = ($nt*8)-1;
+	my $ns = (length($s)-$lt);
+	return "\t"x($nt)." "x($ns);
+}
+
 =back
 
 =cut
diff --git a/source3/modules/vfs_smb_traffic_analyzer.c b/source3/modules/vfs_smb_traffic_analyzer.c
index 06ff1f6..4938ff7 100644
--- a/source3/modules/vfs_smb_traffic_analyzer.c
+++ b/source3/modules/vfs_smb_traffic_analyzer.c
@@ -185,10 +185,10 @@ static char *smb_traffic_analyzer_encrypt( TALLOC_CTX *ctx,
 	*len = ((s1 + 1)*16);
 	output = talloc_array(ctx, char, *len);
 	for (h = 0; h < s1; h++) {
-		samba_AES_encrypt((unsigned char *) str+(16*h), output+16*h,
+		samba_AES_encrypt((const unsigned char *) str+(16*h), (unsigned char *)output+16*h,
 			&key);
 	}
-	samba_AES_encrypt(filler, (const unsigned char *)(output+(16*h)), &key);
+	samba_AES_encrypt(filler, (unsigned char *)(output+(16*h)), &key);
 	*len = (s1*16)+16;
 	return output;
 }
diff --git a/source3/modules/wscript_build b/source3/modules/wscript_build
index d05e58b..e618b08 100644
--- a/source3/modules/wscript_build
+++ b/source3/modules/wscript_build
@@ -376,7 +376,6 @@ bld.SAMBA3_MODULE('vfs_acl_tdb',
 bld.SAMBA3_MODULE('vfs_smb_traffic_analyzer',
                  subsystem='vfs',
                  source='vfs_smb_traffic_analyzer.c',
-                 allow_warnings=True,
                  deps='samba-util',
                  init_function='',
                  internal_module=bld.SAMBA3_IS_STATIC_MODULE('vfs_smb_traffic_analyzer'),
diff --git a/source4/torture/rpc/lsa.c b/source4/torture/rpc/lsa.c
index 95caebb..44cdbdc 100644
--- a/source4/torture/rpc/lsa.c
+++ b/source4/torture/rpc/lsa.c
@@ -2903,6 +2903,8 @@ static bool check_pw_with_ServerAuthenticate3(struct dcerpc_pipe *p,
 	return true;
 }
 
+#ifdef SAMBA4_USES_HEIMDAL
+
 /*
  * This function is set in torture_krb5_init_context as krb5
  * send_and_recv function.  This allows us to override what server the
@@ -4103,6 +4105,7 @@ static bool check_pw_with_krb5(struct torture_context *tctx,
 	TALLOC_FREE(ctx);
 	return true;
 }
+#endif
 
 static bool check_dom_trust_pw(struct dcerpc_pipe *p,
 			       struct torture_context *tctx,
@@ -4234,9 +4237,13 @@ static bool check_dom_trust_pw(struct dcerpc_pipe *p,
 				 "check_pw_with_ServerAuthenticate3");
 
 	if (trusted->trust_type != LSA_TRUST_TYPE_DOWNLEVEL) {
+#ifdef SAMBA4_USES_HEIMDAL
 		ok = check_pw_with_krb5(tctx, incoming_creds, trusted);
 		torture_assert_int_equal(tctx, ok, expected_result,
 					 "check_pw_with_krb5");
+#else
+		torture_comment(tctx, "skipping check_pw_with_krb5 for MIT Kerberos build");
+#endif
 	}
 
 	if (expected_result != true || next_password == NULL) {
@@ -4319,8 +4326,12 @@ static bool check_dom_trust_pw(struct dcerpc_pipe *p,
 	torture_assert(tctx, ok, "check_pw_with_ServerAuthenticate3 with changed password");
 
 	if (trusted->trust_type != LSA_TRUST_TYPE_DOWNLEVEL) {
+#if SAMBA4_USES_HEIMDAL
 		ok = check_pw_with_krb5(tctx, incoming_creds, trusted);
 		torture_assert(tctx, ok, "check_pw_with_krb5 with changed password");
+#else
+		torture_comment(tctx, "skipping check_pw_with_krb5 for MIT Kerberos build");
+#endif
 	}
 
 	TALLOC_FREE(p2);


-- 
Samba Shared Repository



More information about the samba-cvs mailing list