mirror of
https://github.com/scylladb/scylladb.git
synced 2026-04-24 02:20:37 +00:00
reloc: run fix_sharedlib() only on application/x-sharedlib and application/x-pie-executable
We need to prevent to run fix_sharedlib() on non-ELF files. Fixes #4415 Signed-off-by: Takuya ASADA <syuu@scylladb.com> Message-Id: <20190409114941.28276-1-syuu@scylladb.com>
This commit is contained in:
@@ -157,7 +157,7 @@ def copy_file_to_python_env(ar, f):
|
||||
ar.add(os.path.realpath(f), arcname=libfile)
|
||||
else:
|
||||
m = magic.detect_from_filename(f)
|
||||
if m and m.mime_type.startswith('application/'):
|
||||
if m and (m.mime_type.startswith('application/x-sharedlib') or m.mime_type.startswith('application/x-pie-executable')):
|
||||
fix_sharedlib(ar, f, libfile)
|
||||
else:
|
||||
# in case this is a directory that is listed, we don't want to include everything that is in that directory
|
||||
|
||||
Reference in New Issue
Block a user