Closed robert-scheck closed 5 years ago
I've merged this pull request and made some changes to clean some things up. I also changed how the --scontext detection works, could you run a test of this version and verify it works? I don't have an SELinux box available to me. Thanks for the patch!
When just looking to the diff: Doing ls --scontext
in an arbitrary directory (from which drbdlinks
is being called) will lead to various "strange" SELinux AVC denied messages depending on the arbitrary sub-directories or files in that directory, that's why I passed in drbdlinks
itself.
I'll try to fire some tests tonight and will let you know about the results regarding the other changes.
That was an oversight, I meant to pass dunder-file in. Changed and pushed, thanks!
Thank you!
Without #8, RHEL/CentOS 6 (reaches EOL in 11/2020) fails as follows:
$ drbdlinks status
Traceback (most recent call last):
File "/usr/sbin/drbdlinks", line 361, in <module>
config = loadConfigFile(configFile)
File "/usr/sbin/drbdlinks", line 191, in loadConfigFile
config = configClass()
File "/usr/sbin/drbdlinks", line 158, in __init__
subprocess.check_output(
AttributeError: 'module' object has no attribute 'check_output'
$
Great, thanks for checking that and the patch to fix it.
Does it look good to you as it is now?
Yes! I actually tested it now again completely on Python 2.6, 2.7, 3.6 and 3.7 on Red Hat Enterprise Linux/CentOS 6, 7 and 8 as well as on Fedora 29, 30 and 31.
Thanks so much for the testing, the patch, and working with me on the changes. Closing this and doing a release.
Python 2.7 will not be maintained past 2020, so drbdlinks should support Python 3…and if it does, it should be reflected in the documentation.