summaryrefslogtreecommitdiff
path: root/source3/rpcclient
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2003-04-28 05:54:37 +0000
committerTim Potter <tpot@samba.org>2003-04-28 05:54:37 +0000
commit507cdd19966242cb447299fa8e1e1a92584aea8c (patch)
tree737e8900c66fe976c9e79566c2d705b1c718edee /source3/rpcclient
parent03412f056d7a277aab8cf6c3daa850803ae74126 (diff)
downloadsamba-507cdd19966242cb447299fa8e1e1a92584aea8c.tar.gz
samba-507cdd19966242cb447299fa8e1e1a92584aea8c.tar.bz2
samba-507cdd19966242cb447299fa8e1e1a92584aea8c.zip
Merge:
>Patch from waider to set exit code of last executed command specified >as an argument to -c. (This used to be commit b1ad69268889dbc2765ae98789112a28dc4c40c6)
Diffstat (limited to 'source3/rpcclient')
-rw-r--r--source3/rpcclient/rpcclient.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source3/rpcclient/rpcclient.c b/source3/rpcclient/rpcclient.c
index bf016e94c7..0411212e8c 100644
--- a/source3/rpcclient/rpcclient.c
+++ b/source3/rpcclient/rpcclient.c
@@ -628,13 +628,15 @@ out_free:
if (cmdstr && cmdstr[0]) {
char *cmd;
char *p = cmdstr;
+ int result = 0;
while((cmd=next_command(&p)) != NULL) {
- process_cmd(cli, cmd);
+ NTSTATUS cmd_result = process_cmd(cli, cmd);
+ result = NT_STATUS_IS_ERR(cmd_result);
}
cli_shutdown(cli);
- return 0;
+ return result;
}
/* Loop around accepting commands */