Update platforms.py "superuser privileges" check#6600
Conversation
|
@auvipy I don't suppose you know why the tests would be failing, given this is such a minor change? |
|
This pull request fixes 2 alerts when merging 06d3968 into 855d551 - view on LGTM.com fixed alerts:
|
fatal error C1083: Cannot open include file: 'inttypes.h': No such file or directory our windows CI is not perfect & we have to adjust some settings in our github actions migration from travis. it now hangs while running the integration tests |
thedrow
left a comment
There was a problem hiding this comment.
The rest of my comments are mostly nitpicks.
After we address those, this is good to go.
|
This pull request introduces 1 alert when merging 56710f0 into 17eda8d - view on LGTM.com new alerts:
|
|
Before merging this PR we also need to fully unit test the code. |
|
This pull request fixes 1 alert when merging 0244382 into 2551162 - view on LGTM.com fixed alerts:
|
|
Looks OK, what about the tests? |
|
@thedrow what about the logger piece? I couldn't work out what you needed here? |
|
This pull request fixes 2 alerts when merging cb91ae2 into a5357ca - view on LGTM.com fixed alerts:
|
|
@namloc2001 I can't push to your branch since you didn't allow edits from a maintainer. |
Hi, allow edits by maintainers is ticked on this PR already. I've also invited you as a collaborator to the branch in case that is needed |
|
@auvipy Is codecov set up in CI? |
|
I'm marking this as a draft until we cover all code paths. |
|
This pull request introduces 1 alert and fixes 1 when merging 08d7eb2 into 3384937 - view on LGTM.com new alerts:
fixed alerts:
|
Codecov Report
@@ Coverage Diff @@
## master #6600 +/- ##
=======================================
Coverage 70.42% 70.42%
=======================================
Files 138 138
Lines 16437 16457 +20
Branches 2061 2060 -1
=======================================
+ Hits 11575 11590 +15
- Misses 4660 4666 +6
+ Partials 202 201 -1
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
it wasn't. I had internet issues for the last 2 days. so couldn't reply in time, sorry, but you set it up in the meantime. thanks |
* Update platforms.py Making it so that the check for "superuser privileges" is only looking for uid/euid=0, not including the root group (gid/egid=0) which does not have the superuser privileges associated with uid/euid=0. * Update platforms.py * Update platforms.py * Update platforms.py * Update platforms.py * Update celery/platforms.py Co-authored-by: Omer Katz <[email protected]> * Update celery/platforms.py Co-authored-by: Omer Katz <[email protected]> * Update celery/platforms.py Co-authored-by: Omer Katz <[email protected]> * Update celery/platforms.py Co-authored-by: Omer Katz <[email protected]> * Update platforms.py * Update celery/platforms.py Co-authored-by: Omer Katz <[email protected]> * Update platforms.py * Update platforms.py * Update celery/platforms.py Co-authored-by: Omer Katz <[email protected]> * Update platforms.py * Refactor contribution. * Basic tests. * Catch the SecurityError and exit the program. * More tests. * Ensure no warnings are present. * Cover the case where the platform doesn't have fchown available. * Test that a security error is raised when suspicious group names are used. * Remove unused import. Co-authored-by: Omer Katz <[email protected]>
* grp is no longer imported unconditionally. This fixes a regression introduced in celery#6600 which caused an import error on non-unix platforms. Fixes celery#6797. * Adjust tests to cover the new code paths.
Description
To fix issue #6579. Making it so that in
platforms.pythe check for "superuser privileges" is only looking for uid/euid=0, not including the root group (gid/egid=0) which does not have the superuser privileges associated with uid/euid=0.