diff options
author | Tim Potter <tpot@samba.org> | 2003-04-23 07:10:28 +0000 |
---|---|---|
committer | Tim Potter <tpot@samba.org> | 2003-04-23 07:10:28 +0000 |
commit | 1fe7ec8b4bf8141ab5778215e43a3ca19e04d7b9 (patch) | |
tree | 91b144df607a7b3d07a65f2585ef1da04d183923 | |
parent | f3f78bb9b47d77cecb2861c797d2d3b358014211 (diff) | |
download | samba-1fe7ec8b4bf8141ab5778215e43a3ca19e04d7b9.tar.gz samba-1fe7ec8b4bf8141ab5778215e43a3ca19e04d7b9.tar.bz2 samba-1fe7ec8b4bf8141ab5778215e43a3ca19e04d7b9.zip |
Patch from waider to set exit code of last executed command specified
as an argument to -c.
(This used to be commit 048aeefcdc12d93bc728d104bbf38ea8becfb16c)
-rw-r--r-- | source3/rpcclient/rpcclient.c | 6 |
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 */ |