FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-118802: Fix ACL use in test for non-English Windows by zooba · Pull Request #118831 · python/cpython · GitHub

/ cpython Public

gh-118802: Fix ACL use in test for non-English Windows - #118831

Merged
zooba merged 1 commit into
python:mainfrom
zooba:gh-118802
May 9, 2024
Merged

gh-118802: Fix ACL use in test for non-English Windows#118831
zooba merged 1 commit into
python:mainfrom
zooba:gh-118802

Conversation

zooba commented May 9, 2024
edited by bedevere-app Bot
Loading

Copy link
Copy Markdown
Member

zooba added tests Tests in the Lib/test dir skip news needs backport to 3.12 only security fixes needs backport to 3.13 bugs and security fixes labels May 9, 2024
zooba merged commit 82acc5f into python:main May 9, 2024

Copy link
Copy Markdown

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

zooba deleted the gh-118802 branch May 9, 2024 12:59
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request May 9, 2024
…H-118831)

(cherry picked from commit 82acc5f)

Co-authored-by: Steve Dower <steve.dower@python.org>
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request May 9, 2024
…H-118831)

(cherry picked from commit 82acc5f)

Co-authored-by: Steve Dower <steve.dower@python.org>

bedevere-app Bot commented May 9, 2024

Copy link
Copy Markdown

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

bedevere-app Bot removed the needs backport to 3.13 bugs and security fixes label May 9, 2024

bedevere-app Bot commented May 9, 2024

Copy link
Copy Markdown

GH-118838 is a backport of this pull request to the 3.12 branch.

bedevere-app Bot removed the needs backport to 3.12 only security fixes label May 9, 2024
zooba added a commit that referenced this pull request May 9, 2024
(cherry picked from commit 82acc5f)

Co-authored-by: Steve Dower <steve.dower@python.org>
zooba added a commit that referenced this pull request May 9, 2024
(cherry picked from commit 82acc5f)

Co-authored-by: Steve Dower <steve.dower@python.org>
Comment thread Lib/test/test_os.py
# Give delete permission. We are the file owner, so we can do this
# even though we removed all permissions earlier.
subprocess.check_output([ICACLS, filename, "/grant", "Everyone:(D)"],
# Give delete permission to the owner (us)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

You're doing a lot more than you have to. Just /deny the right to synchronize on the file for users (*BU). CreateFileW() always requests SYNCHRONIZE access because it's in the API contract that File handles are waitable. OTOH, DeleteFileW() only needs DELETE access, so you can still delete the file without having to reset the security on it.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

It's only slightly more work, and this is a better emulation of the user report. It should be more robust if something else changes in the future (either failing hard, so we notice, or not failing at all). Being too targeted here could leave us open to the test passing being a false positive based on the environment, so I'd rather just go hard at it and be sure we're testing the right thing.

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL