Skip to content

Conversation

@davidrg
Copy link

@davidrg davidrg commented Nov 18, 2025

The CLEAR APC commands documented purpose is to cause Kermit to remain on the command screen after executing an APC command. As such, this command itself is allowed to be executed by APC.

However, the mechanim the command uses to achieve its goal has an unfortunate side-effect: for the rest of the APC sequence, Kermit now thinks the commands its executing came from the user at the command screen - not the remote host. As a result it stops checking whether subsequent commands are allowed to be executed via APC which is a problem. As APC is off by default the overall impact should be small.

The fix is to set a dedicated flag instead of clearing the apc status, and defer apc clearing until the very end of the APC sequence.

If APC is currently set to UNCHECKED then on non-K95 platforms the former behaviour is preserved as in this state the host can already run what it likes and I'm not sure if actually clearing the APC status mid-APC sequence may have desirable effects in some situations. K95 platforms are excluded as clearing the APC status from inside an APC results in a deadlock (this is how I stumbled on the issue).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant