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 | 048aeefcdc12d93bc728d104bbf38ea8becfb16c (patch) | |
tree | a1e909cd936c751a0da65c21894c3beafdfd8e2f | |
parent | 39f298fd395b91a0cf4bcadf3938b58a9a14c95f (diff) | |
download | samba-048aeefcdc12d93bc728d104bbf38ea8becfb16c.tar.gz samba-048aeefcdc12d93bc728d104bbf38ea8becfb16c.tar.xz samba-048aeefcdc12d93bc728d104bbf38ea8becfb16c.zip |
Patch from waider to set exit code of last executed command specified
as an argument to -c.
-rw-r--r-- | source/rpcclient/rpcclient.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/source/rpcclient/rpcclient.c b/source/rpcclient/rpcclient.c index bf016e94c7c..0411212e8c8 100644 --- a/source/rpcclient/rpcclient.c +++ b/source/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 */ |