summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/rpcclient/rpcclient.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source3/rpcclient/rpcclient.c b/source3/rpcclient/rpcclient.c
index 787545173b..dc93c0536b 100644
--- a/source3/rpcclient/rpcclient.c
+++ b/source3/rpcclient/rpcclient.c
@@ -408,6 +408,9 @@ static uint32 process_cmd(struct cli_state *cli, char *cmd)
char *p = cmd;
uint32 result=0;
+ if (cmd[strlen(cmd) - 1] == '\n')
+ cmd[strlen(cmd) - 1] = '\0';
+
if (!next_token(&p, buf, " ", sizeof(buf))) {
return 0;
}
@@ -633,7 +636,6 @@ static void usage(char *pname)
/* There are no pointers in ntuser_creds struct so zero it out */
ZERO_STRUCTP (&creds);
-
/* Load command lists */
add_command_set(rpcclient_commands);
add_command_set(separator_command);