summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2001-05-31 18:03:45 +0000
committerGerald Carter <jerry@samba.org>2001-05-31 18:03:45 +0000
commitd1e46067408bca1f4beb8d15881b0a589509b1f5 (patch)
tree4e10d393a5e63bbf8c1cc318be812fc1e4aeb741 /source3
parent7a33f253e15a0907b22eb03a3a2c79e9998aa1ec (diff)
downloadsamba-d1e46067408bca1f4beb8d15881b0a589509b1f5.tar.gz
samba-d1e46067408bca1f4beb8d15881b0a589509b1f5.tar.bz2
samba-d1e46067408bca1f4beb8d15881b0a589509b1f5.zip
merge from 2.2
(This used to be commit e30a3be954c0eacb3ccffdaa1165a9f0e8b93a23)
Diffstat (limited to 'source3')
-rw-r--r--source3/rpcclient/rpcclient.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source3/rpcclient/rpcclient.c b/source3/rpcclient/rpcclient.c
index 6707721651..53d5b40698 100644
--- a/source3/rpcclient/rpcclient.c
+++ b/source3/rpcclient/rpcclient.c
@@ -401,6 +401,7 @@ static uint32 process_cmd(struct cli_state *cli, char *cmd)
pstring buf;
char *p = cmd;
uint32 result=0;
+ int len = 0;
if (cmd[strlen(cmd) - 1] == '\n')
cmd[strlen(cmd) - 1] = '\0';
@@ -409,6 +410,11 @@ static uint32 process_cmd(struct cli_state *cli, char *cmd)
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 */
for (temp_list = cmd_list; temp_list; temp_list = temp_list->next) {