1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-25 06:04:04 +03:00

Allow ctrl-d to exit rpcclient.

Don't try to run anything if user just presses return at rpcclient prompt.
This commit is contained in:
Tim Potter -
parent 1e7b1c71b9
commit 37cdf37fee

View File

@ -647,7 +647,6 @@ static void usage(char *pname)
add_command_set(samr_commands); add_command_set(samr_commands);
add_command_set(separator_command); add_command_set(separator_command);
/* Do anything specified with -c */ /* Do anything specified with -c */
if (cmdstr[0]) { if (cmdstr[0]) {
char *cmd; char *cmd;
@ -660,7 +659,6 @@ static void usage(char *pname)
return 0; return 0;
} }
/* Loop around accepting commands */ /* Loop around accepting commands */
while(1) { while(1) {
pstring prompt; pstring prompt;
@ -670,7 +668,12 @@ static void usage(char *pname)
line = smb_readline(prompt, NULL, completion_fn); line = smb_readline(prompt, NULL, completion_fn);
process_cmd(&cli, line); if (line == NULL)
} break;
}
if (line[0] != '\n')
process_cmd(&cli, line);
}
return 0;
}