Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
zooba merged 1 commit intopython:mainfromzooba:gh-118802
May 9, 2024

Conversation

zooba
Copy link
Member

@zoobazooba commentedMay 9, 2024
edited by bedevere-appbot
Loading

@zoobazooba added testsTests in the Lib/test dir skip news needs backport to 3.12only security fixes needs backport to 3.13bugs and security fixes labelsMay 9, 2024
@bedevere-appbedevere-appbot mentioned this pull requestMay 9, 2024
@zoobazooba merged commit82acc5f intopython:mainMay 9, 2024
@miss-islington-app
Copy link

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

@zoobazooba deleted the gh-118802 branchMay 9, 2024 12:59
miss-islington pushed a commit to miss-islington/cpython that referenced this pull requestMay 9, 2024
…H-118831)(cherry picked from commit82acc5f)Co-authored-by: Steve Dower <steve.dower@python.org>
miss-islington pushed a commit to miss-islington/cpython that referenced this pull requestMay 9, 2024
…H-118831)(cherry picked from commit82acc5f)Co-authored-by: Steve Dower <steve.dower@python.org>
@bedevere-app
Copy link

GH-118837 is a backport of this pull request to the3.13 branch.

@bedevere-appbedevere-appbot removed the needs backport to 3.13bugs and security fixes labelMay 9, 2024
@bedevere-app
Copy link

GH-118838 is a backport of this pull request to the3.12 branch.

@bedevere-appbedevere-appbot removed the needs backport to 3.12only security fixes labelMay 9, 2024
zooba added a commit that referenced this pull requestMay 9, 2024
(cherry picked from commit82acc5f)Co-authored-by: Steve Dower <steve.dower@python.org>
SonicField pushed a commit to SonicField/cpython that referenced this pull requestMay 9, 2024
zooba added a commit that referenced this pull requestMay 9, 2024
(cherry picked from commit82acc5f)Co-authored-by: Steve Dower <steve.dower@python.org>
# 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
Contributor

Choose a reason for hiding this comment

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

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

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

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.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@eryksuneryksuneryksun left review comments

Assignees
No one assigned
Labels
skip newstestsTests in the Lib/test dir
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@zooba@eryksun

[8]ページ先頭

©2009-2025 Movatter.jp