From 0eaa469aa87339e141453565d4f7129080d4392d Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Fri, 4 May 2001 04:15:48 +0000 Subject: More usability fixes. (This used to be commit 3434e0bf7fe5cdc8478518c6b1311dda7a7d3e81) --- source3/rpcclient/rpcclient.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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); -- cgit