commit:     60cff8d682fe7816ca0656d4da27e630855287e7
Author:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Fri Oct 22 04:18:15 2021 +0000
Commit:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Fri Oct 22 04:19:44 2021 +0000
URL:        https://gitweb.gentoo.org/proj/sandbox.git/commit/?id=60cff8d6

libsandbox: drop old *.py[co] hack #775416

With our eclasses & python frameworks responsible for generating
these files now, we should be able to reject write attempts to these
again.  Lets turn it back on and see what blows up.

Bug: http://bugs.gentoo.org/256953
Closes: https://bugs.gentoo.org/775416
Signed-off-by: Mike Frysinger <vapier <AT> gentoo.org>

 libsandbox/libsandbox.c | 14 --------------
 1 file changed, 14 deletions(-)

diff --git a/libsandbox/libsandbox.c b/libsandbox/libsandbox.c
index beaf305..4e92cbe 100644
--- a/libsandbox/libsandbox.c
+++ b/libsandbox/libsandbox.c
@@ -868,20 +868,6 @@ static int check_access(sbcontext_t *sbcontext, int sb_nr, 
const char *func,
                        goto out;
                }
 
-               /* A very common bug (apparently) is for .py[co] files to fall 
out
-                * of sync with their .py source files.  Rather than trigger a 
hard
-                * failure, let's just whine about it.  Once python itself gets
-                * sorted out, we can drop this #256953.
-                */
-               size_t len = strlen(resolv_path);
-               if (len > 4) {
-                       const char *py = resolv_path + len - 4;
-                       if (!strcmp(py, ".pyc") || !strcmp(py, ".pyo")) {
-                               sbcontext->show_access_violation = false;
-                               goto out;
-                       }
-               }
-
                /* If we are here, and still no joy, and its the access() call,
                 * do not log it, but just return -1 */
                if (sb_nr == SB_NR_ACCESS_WR) {

Reply via email to