Skip to content

cli_history_cb invocation #671

Description

@EvgeniiVR

Hello @olofhagsand and team,
Have a question regarding history callback invocation.
Do we need to propagate error on top and terminate clixon_cli in case history_cb returs error (-1)?

if (hist_expand_callback(ch, cmd, cvv) < 0)

Because for tacacs integration within this cb if cmd is not authorized we have to return error to stop further command execution, but we don't need to terminate the cli itself.
Probably it's better to break the switch statement here or declare and apply more specific error codes for history cb? e.g:
0 - Ok
-1 - Critical error -> cli termination.
1 - Minor error -> stop further command execution (tacacs usage/etc)
What do you think of this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions