1
0
mirror of https://github.com/Mailu/Mailu.git synced 2025-06-02 23:17:26 +02:00
This commit is contained in:
Florent Daigniere 2023-10-06 14:00:58 +02:00 committed by GitHub
parent 0379857ab5
commit 3985d1d044
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -66,6 +66,7 @@ def _is_compatible_with_hardened_malloc():
lines = f.readlines()
for line in lines:
# See #2764, we need vmovdqu
# See #2959, we need vpunpckldq
if line.startswith('flags') and ' avx2 ' not in line:
return False
# See #2541
@ -80,7 +81,7 @@ def set_env(required_secrets=[], log_filters=[], log_file=None):
log.basicConfig(stream=sys.stderr, level=os.environ.get("LOG_LEVEL", 'WARNING'))
if 'LD_PRELOAD' in os.environ and not _is_compatible_with_hardened_malloc():
log.warning('Disabling hardened-malloc on this CPU')
log.warning('Disabling hardened-malloc on this CPU: it requires Advanced Vector Extensions.')
del os.environ['LD_PRELOAD']
""" This will set all the environment variables and retains only the secrets we need """