Skip to content

GH-85633: Fix pathlib test failures on filesystems without world-write. #122883

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

Merged
merged 2 commits into from
Aug 13, 2024

Conversation

barneygale
Copy link
Contributor

@barneygale barneygale commented Aug 10, 2024

Replace umask(0) with umask(2) so the created files are not world-writable, and replace umask(0o022) with umask(0o026) to check that permissions for 'others' can still be set.

…d-write.

Replace `umask(0)` with `umask(2)` so the created files are not
world-writable, and replace `umask(0o022)` with `umask(0o026)` to check
that permissions for 'others' can still be set.
Copy link
Member

@serhiy-storchaka serhiy-storchaka left a comment

Choose a reason for hiding this comment

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

LGTM.

@barneygale
Copy link
Contributor Author

Thank you for the review!

@barneygale barneygale enabled auto-merge (squash) August 13, 2024 16:50
@barneygale barneygale merged commit 5f68511 into python:main Aug 13, 2024
34 checks passed
@miss-islington-app
Copy link

Thanks @barneygale for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Aug 13, 2024
…d-write. (pythonGH-122883)

Replace `umask(0)` with `umask(0o002)` so the created files are not
world-writable, and replace `umask(0o022)` with `umask(0o026)` to check
that permissions for 'others' can still be set.
(cherry picked from commit 5f68511)

Co-authored-by: Barney Gale <[email protected]>
@bedevere-app
Copy link

bedevere-app bot commented Aug 13, 2024

GH-122979 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.13 bugs and security fixes label Aug 13, 2024
barneygale added a commit that referenced this pull request Aug 13, 2024
…ld-write. (GH-122883) (#122979)

GH-85633: Fix pathlib test failures on filesystems without world-write. (GH-122883)

Replace `umask(0)` with `umask(0o002)` so the created files are not
world-writable, and replace `umask(0o022)` with `umask(0o026)` to check
that permissions for 'others' can still be set.
(cherry picked from commit 5f68511)

Co-authored-by: Barney Gale <[email protected]>
blhsing pushed a commit to blhsing/cpython that referenced this pull request Aug 22, 2024
…d-write. (python#122883)

Replace `umask(0)` with `umask(0o002)` so the created files are not
world-writable, and replace `umask(0o022)` with `umask(0o026)` to check
that permissions for 'others' can still be set.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip news tests Tests in the Lib/test dir topic-pathlib
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants