mirror of
https://github.com/samba-team/samba.git
synced 2024-12-23 17:34:34 +03:00
Patch from waider to set exit code of last executed command specified
as an argument to -c.
(This used to be commit 048aeefcdc
)
This commit is contained in:
parent
f3f78bb9b4
commit
1fe7ec8b4b
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user