Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32.4k
gh-116622: Don't exposeFICLONE
ioctl on Android#122522
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
Uh oh!
There was an error while loading.Please reload this page.
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
A question and a comment:
Q: Where is theFICLONE
andFICLONERANGE
constant coming from? Could this be managed as an autoconf check, rather than an explicit Android#ifdef
?
Comment: This needs docs noting the feature exclusion on Android.
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
They're coming from the operating system headers. fcntlmodule.c has #ifdefs for each one, so they don't need autoconf checks.
I think this is already covered by the statement in thefcntl docs that "The values used forcmd are operating system dependent". There is no list of the available values in the Python documentation. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Ok - those both make sense.
06656e2
intopython:mainUh oh!
There was an error while loading.Please reload this page.
Thanks@mhsmith for the PR, and@freakboy3742 for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13. |
GH-122539 is a backport of this pull request to the3.13 branch. |
Don't expose `FICLONE` ioctl on AndroidCo-authored-by: Russell Keith-Magee <russell@keith-magee.com>
Uh oh!
There was an error while loading.Please reload this page.
Although this ioctl exists in the system headers, it's blocked by SELinux with a message like this:
type=1400 audit(0.0:18729): avc: denied { ioctl } for path=2F646174612F646174612F6F72672E707974686F6E2E746573746265642F63616368652F746573745F707974686F6E5F776F726B65725F36373532C3A62F40746573745F363735325F746D70C3A62F636F707941 dev="dm-39" ino=369303 ioctlcmd=0x9409 scontext=u:r:untrusted_app:s0:c225,c256,c512,c768 tcontext=u:object_r:app_data_file:s0:c225,c256,c512,c768 tclass=file permissive=0 app=org.python.testbed
On Python 3.14 this breaks the test for
Path.copy
, which was added in#119058:On Python 3.13 I don't think Python ever uses this ioctl itself, but it's still worth backporting this PR for the benefit of user code.