diff options
author | Stefan Eßer <se@FreeBSD.org> | 2022-07-24 21:05:50 +0000 |
---|---|---|
committer | Stefan Eßer <se@FreeBSD.org> | 2022-07-24 21:13:13 +0000 |
commit | 116e5db787062c008379e8cd22b8896dd02ef758 (patch) | |
tree | df3632fb6a7dc626d1fac6ecd88f817fa894d9a1 | |
parent | 4ec605c57c04e8fecaa89c276505792bbb3687ac (diff) | |
download | ports-116e5db787062c008379e8cd22b8896dd02ef758.tar.gz ports-116e5db787062c008379e8cd22b8896dd02ef758.zip |
emulators/wine: Fix crash due to ASLR
ASLR has been enabled by default on -CURRENT and -STABLE and this
causes Wine to crash. The clean solution would be to implement some
memory mapping code that already exists for macOS and Linux, but this
is not an essy task.
In order to allow use of Wine on systems with ASLR mark the Wine
executables as not compatible with ASLR using elfctl. This allows
to keeps ASLR enabled on the system for all other binaries.
If the required memory mapping functionality is made available, the
elfctl commands should be removed from this and the other Wine ports.
Approved by: portmgr (implicit)
-rw-r--r-- | emulators/wine/Makefile | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/emulators/wine/Makefile b/emulators/wine/Makefile index ca3084b3c4a9..880575b6029a 100644 --- a/emulators/wine/Makefile +++ b/emulators/wine/Makefile @@ -1,5 +1,6 @@ PORTNAME= wine DISTVERSION= 6.0.4 +PORTREVISION= 1 PORTEPOCH= 1 CATEGORIES= emulators MASTER_SITES= SF/${PORTNAME}/Source \ @@ -158,9 +159,11 @@ post-install: .if ${ARCH} == i386 ${MV} ${STAGEDIR}${PREFIX}/bin/wineserver ${STAGEDIR}${PREFIX}/bin/wineserver32 ${MV} ${STAGEDIR}${PREFIX}/bin/wine ${STAGEDIR}${PREFIX}/bin/wine.bin + -${ELFCTL} -e +noaslr ${STAGEDIR}${PREFIX}/bin/wine.bin ${INSTALL_SCRIPT} ${FILESDIR}/wine.sh ${STAGEDIR}${PREFIX}/bin/wine .else ${MV} ${STAGEDIR}${PREFIX}/bin/wine64 ${STAGEDIR}${PREFIX}/bin/wine64.bin + -${ELFCTL} -e +noaslr ${STAGEDIR}${PREFIX}/bin/wine64.bin ${INSTALL_SCRIPT} ${FILESDIR}/wine.sh ${STAGEDIR}${PREFIX}/bin/wine64 ${INSTALL_SCRIPT} ${FILESDIR}/wine-wow64.sh ${STAGEDIR}${PREFIX}/bin/wine ${INSTALL_SCRIPT} ${FILESDIR}/pkg32.sh ${STAGEDIR}${DATADIR}/pkg32.sh |