8000 gh-108948: tarfile should handle sticky bit in FreeBSD by sorcio · Pull Request #108950 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-108948: tarfile should handle sticky bit in FreeBSD #108950

8000
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

Closed
wants to merge 21 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update Lib/test/test_tarfile.py
Co-authored-by: Victor Stinner <vstinner@python.org>
  • Loading branch information
sorcio and vstinner authored Sep 7, 2023
commit 7b784b5ce77ca2802d71fb00efdddd7ddcbe6b57
4 changes: 2 additions & 2 deletions Lib/test/test_tarfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -3848,8 +3848,8 @@ def test_modes(self):
try:
os.chmod(tmp_filename, new_mode)
except OSError as err:
# FreeBSD fails with EFTYPE if sticky bit cannot be set, instead
# of ignoring it.
# gh-108948: FreeBSD fails with EFTYPE if sticky bit cannot be set,
# instead of ignoring it.
Copy link
Member

Choose a reason for hiding this comment

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

"instead of ignoring it" is not clear. Maybe just remove it? Or explain that other platforms behave differently? You may mention that this is the behavior for non-root users.

if hasattr(errno, "EFTYPE") and err.errno == errno.EFTYPE:
os.chmod(tmp_filename, new_mode & ~stat.S_ISVTX)
else:
Expand Down
0