Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make support for legacy python revocation actions optional #377

Merged
merged 1 commit into from
May 23, 2022

Conversation

ansasaki
Copy link
Contributor

@ansasaki ansasaki commented May 16, 2022

Add the 'legacy-python-actions' feature, enabled by default, to control
whether the agent supports python revocation actions loaded as modules.

Note that this is the only kind of revocation actions script supported
by the python agent implementation, which means that removing this
feature will make existing revocation actions unusable.

Disabling the 'legacy-python-actions' feature will not disable the
support for running stand-alone python revocation action scripts, i.e.
executable python scripts can be used as a revocation actions scripts,
as well as any other executable.

Fixes: #368

Signed-off-by: Anderson Toshiyuki Sasaki [email protected]

src/main.rs Outdated
"Could not find python shim at {}",
python_shim.display()
)));
if cfg!(feature = "legacy-python-actions") {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about using cfg_if! to compile out unnecessary code?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, I'll modify the code to use cfg_if!

@ansasaki ansasaki force-pushed the optional_shim branch 2 times, most recently from 5ba6dc1 to 7fdbc39 Compare May 17, 2022 15:45
@ansasaki ansasaki changed the title Draft: Make support for legacy python revocation actions optional Make support for legacy python revocation actions optional May 17, 2022
Copy link
Contributor

@lkatalin lkatalin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Add the 'legacy-python-actions' feature, enabled by default, to control
whether the agent supports python revocation actions loaded as modules.

Note that this is the only kind of revocation actions script supported
by the python agent implementation, which means that removing this
feature will make existing revocation actions unusable.

Disabling the 'legacy-python-actions' feature will not disable the
support for running stand-alone python revocation action scripts, i.e.
executable python scripts can be used as a revocation actions scripts,
as well as any other executable.

Signed-off-by: Anderson Toshiyuki Sasaki <[email protected]>
@ansasaki ansasaki merged commit 88eea21 into keylime:master May 23, 2022
@ansasaki ansasaki deleted the optional_shim branch May 25, 2022 14:32
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.

Agent fails to start if shim.py is not found
5 participants