git.samba.org
/
jra
/
samba
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
401b3cc
)
Allow ctrl-d to exit rpcclient.
author
Tim Potter
<tpot@samba.org>
Fri, 4 May 2001 01:04:23 +0000
(
01:04
+0000)
committer
Tim Potter
<tpot@samba.org>
Fri, 4 May 2001 01:04:23 +0000
(
01:04
+0000)
Don't try to run anything if user just presses return at rpcclient prompt.
(This used to be commit
37cdf37fee8414183c4ecb49e68a468ad235787d
)
source3/rpcclient/rpcclient.c
patch
|
blob
|
history
diff --git
a/source3/rpcclient/rpcclient.c
b/source3/rpcclient/rpcclient.c
index d50510212ef51a6fc4a6f55d41c43cac9e7f2bf5..787545173be3dd7f9929f6c8ec61432ddb5ecc89 100644
(file)
--- a/
source3/rpcclient/rpcclient.c
+++ b/
source3/rpcclient/rpcclient.c
@@
-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;
+}