rpcclient.c/process_cmd has if (cmd[strlen(cmd) - 1] == '\n') cmd[strlen(cmd) - 1] = '\0'; if (!next_token(&p, buf, " ", sizeof(buf))) { return NT_STATUS_OK; } /* strip the trainly \n if it exsists */ len = strlen(buf); if (buf[len-1] == '\n') buf[len-1] = '\0'; Isn't the second check for newline redundant? -- Martin