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

Commit06656e2

Browse files
gh-116622: Don't exposeFICLONE ioctl on Android (#122522)
Don't expose `FICLONE` ioctl on AndroidCo-authored-by: Russell Keith-Magee <russell@keith-magee.com>
1 parent8844197 commit06656e2

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
On Android, the ``FICLONE`` and ``FICLONERANGE`` constants are no longer
2+
exposed by:mod:`fcntl`, as these ioctls are blocked by SELinux.

‎Modules/fcntlmodule.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -580,12 +580,17 @@ all_ins(PyObject* m)
580580
#ifdefF_GETPIPE_SZ
581581
if (PyModule_AddIntMacro(m,F_GETPIPE_SZ))return-1;
582582
#endif
583+
584+
/* On Android, FICLONE is blocked by SELinux. */
585+
#ifndef__ANDROID__
583586
#ifdefFICLONE
584587
if (PyModule_AddIntMacro(m,FICLONE))return-1;
585588
#endif
586589
#ifdefFICLONERANGE
587590
if (PyModule_AddIntMacro(m,FICLONERANGE))return-1;
588591
#endif
592+
#endif
593+
589594
#ifdefF_GETOWN_EX
590595
// since Linux 2.6.32
591596
if (PyModule_AddIntMacro(m,F_GETOWN_EX))return-1;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp