1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-12 09:18:10 +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 0001-01-01 00:00:00 +00:00
parent 1e7b1c71b9
commit 37cdf37fee

View File

@ -647,7 +647,6 @@ static void usage(char *pname)
add_command_set(samr_commands);
add_command_set(separator_command);
/* Do anything specified with -c */
if (cmdstr[0]) {
char *cmd;
@ -660,7 +659,6 @@ static void usage(char *pname)
return 0;
}
/* Loop around accepting commands */
while(1) {
pstring prompt;
@ -670,7 +668,12 @@ static void usage(char *pname)
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;
}