selinux icon indicating copy to clipboard operation
selinux copied to clipboard

use sys.executable

Open br-olf opened this issue 2 years ago • 8 comments

Fixed nasty bug

br-olf avatar Mar 14 '23 15:03 br-olf

How to add PR labels?

br-olf avatar Mar 14 '23 15:03 br-olf

I rewrote my PR to look for selinux site-package in all provided places and it should now be easy to add further places to look into. Please review the PR now.

br-olf avatar Mar 15 '23 12:03 br-olf

BTW, this now also adds support for virtualenvs

br-olf avatar Mar 15 '23 13:03 br-olf

@ssbarnea Do you have any plans of merging this?

br-olf avatar Mar 28 '23 00:03 br-olf

This (gh pr checkout 68) fixed my problem using the selinux package with pyenv with a virtualenv. I vote for merge.

fbicknel avatar Sep 21 '23 18:09 fbicknel

Hi. I think this is working because it's reloading on itself and the check for is_selinux_enabled() is always the local one, not from the original library. I tested this on a selinux enabled system and I always receive a '0', which it's the return call from the local method instead.

If I'm understanding correctly, this shim library should reload using selinux bindings if they are installed. If this is correct, I understand why we cannot merge this.

Please correct me if I'm wrong.

ps: I also looking for a solution to this problem. I can help if you guys let me.

gonzalemario avatar Jan 31 '24 03:01 gonzalemario

ansible now from version 8, loads selinux differently. Basically it's using ctypes to get the .so

I might understand why the main developers haven't payed attention to this PR

gonzalemario avatar Feb 26 '24 20:02 gonzalemario

Can someone please get this reviewed and merged?!! #17 not only fixed virtualenv setups, but broke more standard installs such as those done from source, which install under /usr/local/bin by default (and might even break RHEL SCL installs which would install under /opt/rh... I have just started using those, so have not checked). See my comment on #69 for more info.

cinnion avatar Oct 15 '24 13:10 cinnion