svn commit: samba r23372 - in branches: SAMBA_3_0/source/rpcclient
SAMBA_3_0_25/source/rpcclient SAMBA_3_0_26/source/rpcclient
jra at samba.org
jra at samba.org
Thu Jun 7 01:13:45 GMT 2007
Author: jra
Date: 2007-06-07 01:13:43 +0000 (Thu, 07 Jun 2007)
New Revision: 23372
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=23372
Log:
Remove restriction on string length for rpcclient commands.
Jeremy.
Modified:
branches/SAMBA_3_0/source/rpcclient/rpcclient.c
branches/SAMBA_3_0_25/source/rpcclient/rpcclient.c
branches/SAMBA_3_0_26/source/rpcclient/rpcclient.c
Changeset:
Modified: branches/SAMBA_3_0/source/rpcclient/rpcclient.c
===================================================================
--- branches/SAMBA_3_0/source/rpcclient/rpcclient.c 2007-06-07 00:14:06 UTC (rev 23371)
+++ branches/SAMBA_3_0/source/rpcclient/rpcclient.c 2007-06-07 01:13:43 UTC (rev 23372)
@@ -108,9 +108,9 @@
return matches;
}
-static char* next_command (char** cmdstr)
+static char *next_command (char **cmdstr)
{
- static pstring command;
+ char *command;
char *p;
if (!cmdstr || !(*cmdstr))
@@ -119,7 +119,7 @@
p = strchr_m(*cmdstr, ';');
if (p)
*p = '\0';
- pstrcpy(command, *cmdstr);
+ command = SMB_STRDUP(*cmdstr);
if (p)
*cmdstr = p + 1;
else
@@ -868,6 +868,7 @@
while((cmd=next_command(&p)) != NULL) {
NTSTATUS cmd_result = process_cmd(cli, cmd);
+ SAFE_FREE(cmd);
result = NT_STATUS_IS_ERR(cmd_result);
}
Modified: branches/SAMBA_3_0_25/source/rpcclient/rpcclient.c
===================================================================
--- branches/SAMBA_3_0_25/source/rpcclient/rpcclient.c 2007-06-07 00:14:06 UTC (rev 23371)
+++ branches/SAMBA_3_0_25/source/rpcclient/rpcclient.c 2007-06-07 01:13:43 UTC (rev 23372)
@@ -107,9 +107,9 @@
return matches;
}
-static char* next_command (char** cmdstr)
+static char *next_command (char **cmdstr)
{
- static pstring command;
+ char *command;
char *p;
if (!cmdstr || !(*cmdstr))
@@ -118,7 +118,7 @@
p = strchr_m(*cmdstr, ';');
if (p)
*p = '\0';
- pstrcpy(command, *cmdstr);
+ command = SMB_STRDUP(*cmdstr);
if (p)
*cmdstr = p + 1;
else
@@ -828,6 +828,7 @@
while((cmd=next_command(&p)) != NULL) {
NTSTATUS cmd_result = process_cmd(cli, cmd);
+ SAFE_FREE(cmd);
result = NT_STATUS_IS_ERR(cmd_result);
}
Modified: branches/SAMBA_3_0_26/source/rpcclient/rpcclient.c
===================================================================
--- branches/SAMBA_3_0_26/source/rpcclient/rpcclient.c 2007-06-07 00:14:06 UTC (rev 23371)
+++ branches/SAMBA_3_0_26/source/rpcclient/rpcclient.c 2007-06-07 01:13:43 UTC (rev 23372)
@@ -108,9 +108,9 @@
return matches;
}
-static char* next_command (char** cmdstr)
+static char *next_command (char **cmdstr)
{
- static pstring command;
+ char *command;
char *p;
if (!cmdstr || !(*cmdstr))
@@ -119,7 +119,7 @@
p = strchr_m(*cmdstr, ';');
if (p)
*p = '\0';
- pstrcpy(command, *cmdstr);
+ command = SMB_STRDUP(*cmdstr);
if (p)
*cmdstr = p + 1;
else
@@ -866,6 +866,7 @@
while((cmd=next_command(&p)) != NULL) {
NTSTATUS cmd_result = process_cmd(cli, cmd);
+ SAFE_FREE(cmd);
result = NT_STATUS_IS_ERR(cmd_result);
}
More information about the samba-cvs
mailing list