Changeset 100498 in vbox for trunk/src/VBox/Devices
- Timestamp:
- Jul 11, 2023 7:51:53 AM (20 months ago)
- svn:sync-xref-src-repo-rev:
- 158279
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/EFI/Firmware/BaseTools/Source/Python/Common/Misc.py
r89983 r100498 64 64 # 65 65 _TempInfs = [] 66 67 # VBox: BEGIN 68 # 69 # Monkey patching copyxattr to also ignore errno.EACCES for older python versions. 70 # Otherwise building in a docker container fails due to a PermissionError because SELinux 71 # denies copying the security context extended attributes. This was just fixed 3 months ago 72 # in python so all our python versions in the containers are too old to have it. 73 # 74 # [vbox@tinderlin ~]$ sudo ausearch -m AVC,USER_AVC -ts recent 75 # time->Tue Jul 11 07:44:16 2023 76 # type=AVC msg=audit(1689061456.361:1300563): avc: denied { relabelto } for pid=1160256 comm="python3" 77 # name="PcdPeim.uni" dev="sda1" ino=186911506 scontext=system_u:system_r:container_t:s0:c100,c482 78 # tcontext=unconfined_u:object_r:container_file_t:s0 tclass=file permissive=0 79 # 80 # See for further reference: 81 # https://github.com/python/cpython/issues/82814 82 # https://bugs.python.org/issue38893 83 # https://github.com/python/cpython/pull/21430 84 # 85 import errno 86 orig_copyxattr = shutil._copyxattr 87 def patched_copyxattr(src, dst, *, follow_symlinks=True): 88 try: 89 orig_copyxattr(src, dst, follow_symlinks=follow_symlinks) 90 except OSError as ex: 91 if ex.errno != errno.EACCES: raise 92 shutil._copyxattr = patched_copyxattr 93 # VBox: END 66 94 67 95 def GetVariableOffset(mapfilepath, efifilepath, varnames):
Note:
See TracChangeset
for help on using the changeset viewer.