fix(audit): make 'emqx eval' command auditable
This commit is contained in:
parent
1f8985d09e
commit
d3779a3219
|
@ -140,9 +140,10 @@ do(Args) ->
|
||||||
io:format("~p\n", [Other])
|
io:format("~p\n", [Other])
|
||||||
end;
|
end;
|
||||||
["eval" | ListOfArgs] ->
|
["eval" | ListOfArgs] ->
|
||||||
|
% parse args locally in the remsh node
|
||||||
Parsed = parse_eval_args(ListOfArgs),
|
Parsed = parse_eval_args(ListOfArgs),
|
||||||
% and evaluate it on the remote node
|
% and evaluate it on the remote node
|
||||||
case rpc:call(TargetNode, emqx_ctl, eval_erl, [Parsed]) of
|
case rpc:call(TargetNode, emqx_ctl, run_command, [eval_erl, Parsed], infinity) of
|
||||||
{ok, Value} ->
|
{ok, Value} ->
|
||||||
io:format("~p~n", [Value]);
|
io:format("~p~n", [Value]);
|
||||||
{badrpc, Reason} ->
|
{badrpc, Reason} ->
|
||||||
|
|
Loading…
Reference in New Issue