[SCM] Samba Shared Repository - branch master updated

Andrew Bartlett abartlet at samba.org
Thu Dec 22 01:03:03 MST 2011


The branch, master has been updated
       via  8115c99 s3-rpc_server: Add my copyright for my previous work here
       via  7e69085 s3-rpc_server: Remove old comment
       via  454aff6 s3-rpc: added "rpc_server:default" config option
       via  cd24ed9 s3-loadparm: mark a few parameters as having P_BYTES type
      from  cd772e9 param: Fix the data type for bAvailable

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


- Log -----------------------------------------------------------------
commit 8115c99a9755dad0befb1b5184a29068ffb5be57
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Fri Dec 16 13:19:06 2011 +1100

    s3-rpc_server: Add my copyright for my previous work here
    
    Autobuild-User: Andrew Bartlett <abartlet at samba.org>
    Autobuild-Date: Thu Dec 22 09:02:57 CET 2011 on sn-devel-104

commit 7e6908502b4d40608b5a7e2392d7ffabcc380f78
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Fri Dec 16 13:18:50 2011 +1100

    s3-rpc_server: Remove old comment

commit 454aff611596857e80b0388bba0840d96ef73035
Author: Andrew Tridgell <tridge at samba.org>
Date:   Tue Dec 6 12:15:40 2011 +1100

    s3-rpc: added "rpc_server:default" config option
    
    this allows the config to specify a default behaviour (embedded,
    external or disabled) for unknown pipes. This is needed to allow the
    s3 smbd server to redirect unknown pipes to the s4 RPC server when
    using s3 smbd as a file server for a s4 DC. If rpc_server:default is
    not specified then this change preserves the old behaviour

commit cd24ed920ef69d063ac84ccbd8052928fe6cd0e9
Author: Andrew Tridgell <tridge at samba.org>
Date:   Wed Nov 30 17:29:10 2011 +1100

    s3-loadparm: mark a few parameters as having P_BYTES type
    
    this fixes a problem with "max xmit = 32K" resulting in a maximum SMB
    transmit size of 32 bytes, which makes for some very interesting
    network traces!
    
    This is what was causing smbtorture to consume gigabytes of memory in
    the rpc.schannel test

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

Summary of changes:
 source3/param/loadparm.c            |   24 ++++++++++++------------
 source3/rpc_server/dcesrv_gssapi.c  |    5 -----
 source3/rpc_server/dcesrv_ntlmssp.c |    1 +
 source3/rpc_server/rpc_config.c     |   16 ++++++++++++----
 4 files changed, 25 insertions(+), 21 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c
index 1bd2733..1310353 100644
--- a/source3/param/loadparm.c
+++ b/source3/param/loadparm.c
@@ -1418,7 +1418,7 @@ static struct parm_struct parm_table[] = {
 	},
 	{
 		.label		= "max log size",
-		.type		= P_INTEGER,
+		.type		= P_BYTES,
 		.p_class	= P_GLOBAL,
 		.offset		= GLOBAL_VAR(max_log_size),
 		.special	= NULL,
@@ -1502,7 +1502,7 @@ static struct parm_struct parm_table[] = {
 
 	{
 		.label		= "allocation roundup size",
-		.type		= P_INTEGER,
+		.type		= P_BYTES,
 		.p_class	= P_LOCAL,
 		.offset		= LOCAL_VAR(iallocation_roundup_size),
 		.special	= NULL,
@@ -1511,7 +1511,7 @@ static struct parm_struct parm_table[] = {
 	},
 	{
 		.label		= "aio read size",
-		.type		= P_INTEGER,
+		.type		= P_BYTES,
 		.p_class	= P_LOCAL,
 		.offset		= LOCAL_VAR(iAioReadSize),
 		.special	= NULL,
@@ -1520,7 +1520,7 @@ static struct parm_struct parm_table[] = {
 	},
 	{
 		.label		= "aio write size",
-		.type		= P_INTEGER,
+		.type		= P_BYTES,
 		.p_class	= P_LOCAL,
 		.offset		= LOCAL_VAR(iAioWriteSize),
 		.special	= NULL,
@@ -1583,7 +1583,7 @@ static struct parm_struct parm_table[] = {
 	},
 	{
 		.label		= "min receivefile size",
-		.type		= P_INTEGER,
+		.type		= P_BYTES,
 		.p_class	= P_GLOBAL,
 		.offset		= GLOBAL_VAR(iminreceivefile),
 		.special	= NULL,
@@ -1727,7 +1727,7 @@ static struct parm_struct parm_table[] = {
 	},
 	{
 		.label		= "max xmit",
-		.type		= P_INTEGER,
+		.type		= P_BYTES,
 		.p_class	= P_GLOBAL,
 		.offset		= GLOBAL_VAR(max_xmit),
 		.special	= NULL,
@@ -1865,7 +1865,7 @@ static struct parm_struct parm_table[] = {
 
 	{
 		.label		= "block size",
-		.type		= P_INTEGER,
+		.type		= P_BYTES,
 		.p_class	= P_LOCAL,
 		.offset		= LOCAL_VAR(iBlock_size),
 		.special	= NULL,
@@ -1964,7 +1964,7 @@ static struct parm_struct parm_table[] = {
 	},
 	{
 		.label		= "max disk size",
-		.type		= P_INTEGER,
+		.type		= P_BYTES,
 		.p_class	= P_GLOBAL,
 		.offset		= GLOBAL_VAR(maxdisksize),
 		.special	= NULL,
@@ -2054,7 +2054,7 @@ static struct parm_struct parm_table[] = {
 	},
 	{
 		.label		= "write cache size",
-		.type		= P_INTEGER,
+		.type		= P_BYTES,
 		.p_class	= P_LOCAL,
 		.offset		= LOCAL_VAR(iWriteCacheSize),
 		.special	= NULL,
@@ -2117,7 +2117,7 @@ static struct parm_struct parm_table[] = {
 	},
 	{
 		.label		= "smb2 max read",
-		.type		= P_INTEGER,
+		.type		= P_BYTES,
 		.p_class	= P_GLOBAL,
 		.offset		= GLOBAL_VAR(ismb2_max_read),
 		.special	= NULL,
@@ -2126,7 +2126,7 @@ static struct parm_struct parm_table[] = {
 	},
 	{
 		.label		= "smb2 max write",
-		.type		= P_INTEGER,
+		.type		= P_BYTES,
 		.p_class	= P_GLOBAL,
 		.offset		= GLOBAL_VAR(ismb2_max_write),
 		.special	= NULL,
@@ -2135,7 +2135,7 @@ static struct parm_struct parm_table[] = {
 	},
 	{
 		.label		= "smb2 max trans",
-		.type		= P_INTEGER,
+		.type		= P_BYTES,
 		.p_class	= P_GLOBAL,
 		.offset		= GLOBAL_VAR(ismb2_max_trans),
 		.special	= NULL,
diff --git a/source3/rpc_server/dcesrv_gssapi.c b/source3/rpc_server/dcesrv_gssapi.c
index 8a7741b..be97a64 100644
--- a/source3/rpc_server/dcesrv_gssapi.c
+++ b/source3/rpc_server/dcesrv_gssapi.c
@@ -44,11 +44,6 @@ NTSTATUS gssapi_server_auth_start(TALLOC_CTX *mem_ctx,
 	}
 
 	/* Let's init the gssapi machinery for this connection */
-	/* passing a NULL server name means the server will try
-	 * to accept any connection regardless of the name used as
-	 * long as it can find a decryption key */
-	/* by passing NULL, the code will attempt to set a default
-	 * keytab based on configuration options */
 	status = gse_init_server(mem_ctx, do_sign, do_seal,
 				 add_flags, &gse_ctx);
 	if (!NT_STATUS_IS_OK(status)) {
diff --git a/source3/rpc_server/dcesrv_ntlmssp.c b/source3/rpc_server/dcesrv_ntlmssp.c
index e03b335..242695e 100644
--- a/source3/rpc_server/dcesrv_ntlmssp.c
+++ b/source3/rpc_server/dcesrv_ntlmssp.c
@@ -2,6 +2,7 @@
  *  NTLMSSP Acceptor
  *  DCERPC Server functions
  *  Copyright (C) Simo Sorce 2010.
+ *  Copyright (C) Andrew Bartlett 2011.
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
diff --git a/source3/rpc_server/rpc_config.c b/source3/rpc_server/rpc_config.c
index 3ddc189..d3a46dd 100644
--- a/source3/rpc_server/rpc_config.c
+++ b/source3/rpc_server/rpc_config.c
@@ -54,10 +54,18 @@ enum rpc_service_mode_e rpc_service_mode(const char *name)
 		pipe_name = "ntsvcs";
 	}
 
-	def = "embedded";
-	for (i = 0; rpc_service_defaults[i].name; i++) {
-		if (strcasecmp_m(pipe_name, rpc_service_defaults[i].name) == 0) {
-			def = rpc_service_defaults[i].def_mode;
+	def = lp_parm_const_string(GLOBAL_SECTION_SNUM,
+				   "rpc_server", "default", NULL);
+	if (def == NULL) {
+		for (i = 0; rpc_service_defaults[i].name; i++) {
+			if (strcasecmp_m(pipe_name, rpc_service_defaults[i].name) == 0) {
+				def = rpc_service_defaults[i].def_mode;
+				break;
+			}
+		}
+		/* if the default is unspecified then use 'embedded' */
+		if (def == NULL) {
+			def = "embedded";
 		}
 	}
 


-- 
Samba Shared Repository


More information about the samba-cvs mailing list