Samba-2.2.0 rpcclient problem on Solaris 2.6
Gerald Carter
gcarter at valinux.com
Fri May 25 18:46:25 GMT 2001
On Mon, 21 May 2001, Michael St. Laurent wrote:
> I compiled rpcclient on a Solaris 2.6 machine and something is very
> wrong. To many commands (including quit) it replies "command not
> found" and when I use a ctrl-d to exit it core dumps.
This should fix it. applied to SAMBA_2_2
----------cut here----------------------
--- rpcclient/rpcclient.c 4
May 2001 14:16:47 -0000 1.120.4.11
+++ rpcclient/rpcclient.c 25 May 2001 18:40:26 -0000
@@ -407,6 +407,7 @@
pstring buf;
char *p = cmd;
uint32 result=0;
+ int len = 0;
if (cmd[strlen(cmd) - 1] == '\n')
cmd[strlen(cmd) - 1] = '\0';
@@ -414,6 +415,11 @@
if (!next_token(&p, buf, " ", sizeof(buf))) {
return 0;
}
+
+ /* strip the trainly \n if it exsists */
+ len = strlen(buf);
+ if (buf[len-1] == '\n')
+ buf[len-1] = '\0';
/* Search for matching commands */
-----cut here------------------------------------------------w
More information about the samba-technical
mailing list