[SCM] Samba Shared Repository - branch master updated

Volker Lendecke vlendec at samba.org
Sat Sep 18 08:44:44 MDT 2010


The branch, master has been updated
       via  7fddf9c s3: Fix bug 7688, rpcclient command line completion crashing
       via  252e8c2 s3: Fix some nonempty blank lines
      from  d76bb4a s4-drs: Check for schema changes only in case we are *not* applying Schema replica

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


- Log -----------------------------------------------------------------
commit 7fddf9c89e8ead26e6367195441f49bce5a6b3db
Author: Volker Lendecke <vl at samba.org>
Date:   Sat Sep 18 07:37:04 2010 -0700

    s3: Fix bug 7688, rpcclient command line completion crashing
    
    We've grown more than 100 rpcclient commands by now, so this would overwrite
    the array of 100 completions. There's nicer ways to fix this problem, but 1000
    rpcclient commands should be at least a bit away.

commit 252e8c27eb07eea7ec45e76a9256692db1019af4
Author: Volker Lendecke <vl at samba.org>
Date:   Fri Sep 17 21:16:24 2010 +0200

    s3: Fix some nonempty blank lines

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

Summary of changes:
 source3/rpcclient/rpcclient.c |   27 +++++++++++++--------------
 1 files changed, 13 insertions(+), 14 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/rpcclient/rpcclient.c b/source3/rpcclient/rpcclient.c
index 9529212..b34ef2c 100644
--- a/source3/rpcclient/rpcclient.c
+++ b/source3/rpcclient/rpcclient.c
@@ -9,12 +9,12 @@
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 3 of the License, or
    (at your option) any later version.
-   
+
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.
-   
+
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
@@ -54,7 +54,7 @@ handle completion of commands for readline
 ****************************************************************************/
 static char **completion_fn(const char *text, int start, int end)
 {
-#define MAX_COMPLETIONS 100
+#define MAX_COMPLETIONS 1000
 	char **matches;
 	int i, count=0;
 	struct cmd_list *commands = cmd_list;
@@ -87,7 +87,7 @@ static char **completion_fn(const char *text, int start, int end)
 		if (!commands->cmd_set) {
 			break;
 		}
-		
+
 		for (i=0; commands->cmd_set[i].name; i++) {
 			if ((strncmp(text, commands->cmd_set[i].name, strlen(text)) == 0) &&
 				(( commands->cmd_set[i].returntype == RPC_RTYPE_NTSTATUS &&
@@ -106,7 +106,6 @@ static char **completion_fn(const char *text, int start, int end)
 			}
 		}
 		commands = commands->next;
-		
 	}
 
 	if (count == 2) {
@@ -121,10 +120,10 @@ static char *next_command (char **cmdstr)
 {
 	char *command;
 	char			*p;
-	
+
 	if (!cmdstr || !(*cmdstr))
 		return NULL;
-	
+
 	p = strchr_m(*cmdstr, ';');
 	if (p)
 		*p = '\0';
@@ -133,7 +132,7 @@ static char *next_command (char **cmdstr)
 		*cmdstr = p + 1;
 	else
 		*cmdstr = NULL;
-	
+
 	return command;
 }
 
@@ -161,7 +160,7 @@ static void fetch_machine_sid(struct cli_state *cli)
 		fprintf(stderr, "could not initialise lsa pipe. Error was %s\n", nt_errstr(result) );
 		goto error;
 	}
-	
+
 	result = rpccli_lsa_open_policy(lsapipe, mem_ctx, True, 
 				     SEC_FLAG_MAXIMUM_ALLOWED,
 				     &pol);
@@ -222,7 +221,7 @@ static NTSTATUS cmd_listcommands(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ct
 	for (tmp = cmd_list; tmp; tmp = tmp->next) 
 	{
 		tmp_set = tmp->cmd_set;
-		
+
 		if (!StrCaseCmp(argv[1], tmp_set->name))
 		{
 			printf("Available commands on the %s pipe:\n\n", tmp_set->name);
@@ -236,7 +235,7 @@ static NTSTATUS cmd_listcommands(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ct
 				if (i%3 == 0)
 					printf("\n");
 			}
-			
+
 			/* drop out of the loop */
 			break;
 		}
@@ -265,7 +264,7 @@ static NTSTATUS cmd_help(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
 
         if (argc == 2) {
                 for (tmp = cmd_list; tmp; tmp = tmp->next) {
-                        
+
                         tmp_set = tmp->cmd_set;
 
                         while(tmp_set->name) {
@@ -475,7 +474,7 @@ static NTSTATUS cmd_timeout(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
 		timeout = atoi(argv[1]);
 
 		for (tmp = cmd_list; tmp; tmp = tmp->next) {
-			
+
 			struct cmd_set *tmp_set;
 
 			for (tmp_set = tmp->cmd_set; tmp_set->name; tmp_set++) {
@@ -650,7 +649,7 @@ static NTSTATUS do_cmd(struct cli_state *cli,
 {
 	NTSTATUS ntresult;
 	WERROR wresult;
-	
+
 	TALLOC_CTX *mem_ctx;
 
 	/* Create mem_ctx */


-- 
Samba Shared Repository


More information about the samba-cvs mailing list