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

Appearance settings

gh-134546: ensure remote pdb script is readable #134552

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

Conversation

asottile
Copy link
Contributor

@asottile asottile commented May 22, 2025

@asottile asottile force-pushed the pdb-script-readable-permission-134546 branch from 4fd050e to 855651b Compare May 22, 2025 22:14
@gaogaotiantian
Copy link
Member

The news is a bit inaccurate. It's more about client process creating a file that server process does not have access to. It is permission issue, but there are many kinds of permission issues and they are not all fixed. Could you be a little bit more accurate on the news?

Also cc @godlygeek and @pablogsal . I think the fix is fine but maybe you have other suggestions.

@asottile
Copy link
Contributor Author

maybe it's just a wording thing? I think the news is accurate but perhaps too broad. the script from pdb can't be read in the process that's being debugged

@gaogaotiantian
Copy link
Member

I think it's a wording thing. I think the issue is that, we did not fix it from the reading side. It's not like we fixed something so the process can read that file. We granted the read permission after we wrote it - that's what's fixed.

@asottile
Copy link
Contributor Author

do you have a suggestion for the contents of the news file?

@gaogaotiantian
Copy link
Member

I would do something like

Grant read permission to the attach script for all processes for :func:`pdb.attach` so it can be read by :func:`sys.remote_exec`.

I'm also not the expert in news and I'll probably wait for someone else to see if this is a better description.

@emmatyping emmatyping added the needs backport to 3.14 bugs and security fixes label May 23, 2025
@emmatyping
Copy link
Member

Perhaps

Ensure :func:`pdb.attach` script is readable by remote Python process.

@godlygeek
Copy link
Contributor

Fix looks reasonable to me. For the news entry, maybe "Fix PermissionError when a superuser attaches PDB to another user's process" or something like that.

@gaogaotiantian
Copy link
Member

@asottile you can sum the suggestions up and make it a bit clearer. news is not as strict as the real documentation. Good to have a clear one but won't be a serious blocker.

…jLVzK.rst

Co-authored-by: Emma Smith <emma@emmatyping.dev>
@gaogaotiantian gaogaotiantian merged commit 74a9c60 into python:main May 24, 2025
43 checks passed
@miss-islington-app
Copy link

Thanks @asottile for the PR, and @gaogaotiantian for merging it 🌮🎉.. I'm working now to backport this PR to: 3.14.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request May 24, 2025
(cherry picked from commit 74a9c60f3ee2195e506144c3811090f1334c996b)

Co-authored-by: Anthony Sottile <asottile@umich.edu>
@gaogaotiantian
Copy link
Member

Thanks for the PR!

@bedevere-app
Copy link

bedevere-app bot commented May 24, 2025

GH-134616 is a backport of this pull request to the 3.14 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.14 bugs and security fixes label May 24, 2025
gaogaotiantian pushed a commit that referenced this pull request May 24, 2025
…134616)

gh-134546: ensure remote pdb script is readable (GH-134552)
(cherry picked from commit 74a9c60)

Co-authored-by: Anthony Sottile <asottile@umich.edu>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.