More usability fixes.
authorTim Potter <tpot@samba.org>
Fri, 4 May 2001 04:15:48 +0000 (04:15 +0000)
committerTim Potter <tpot@samba.org>
Fri, 4 May 2001 04:15:48 +0000 (04:15 +0000)
(This used to be commit 3434e0bf7fe5cdc8478518c6b1311dda7a7d3e81)

source3/rpcclient/rpcclient.c

index 787545173be3dd7f9929f6c8ec61432ddb5ecc89..dc93c0536bbe65ae118bb093f363b57b5c4a016f 100644 (file)
@@ -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);