git: b38e81cff896 - stable/13 - Disable sandboxing when building with WITHOUT_CAPSICUM.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 03 Feb 2023 07:19:09 UTC
The branch stable/13 has been updated by delphij: URL: https://cgit.FreeBSD.org/src/commit/?id=b38e81cff896eed0e38f611bd2c93229808a8ef9 commit b38e81cff896eed0e38f611bd2c93229808a8ef9 Author: Xin LI <delphij@FreeBSD.org> AuthorDate: 2023-01-28 18:53:47 +0000 Commit: Xin LI <delphij@FreeBSD.org> CommitDate: 2023-02-03 07:18:55 +0000 Disable sandboxing when building with WITHOUT_CAPSICUM. PR: bin/269185 (cherry picked from commit 8f02c0d15669949bb3b5086800aaf11a65e4c871) --- lib/liblzma/config.h | 4 ++++ usr.bin/xz/Makefile | 6 +++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/lib/liblzma/config.h b/lib/liblzma/config.h index d88e3e105dad..ed6515f56f6e 100644 --- a/lib/liblzma/config.h +++ b/lib/liblzma/config.h @@ -24,8 +24,10 @@ /* Define to 1 if you have the <byteswap.h> header file. */ /* #undef HAVE_BYTESWAP_H */ +#ifndef WITHOUT_CAPSICUM /* Define to 1 if Capsicum is available. */ #define HAVE_CAPSICUM 1 +#endif /* Define to 1 if the system has the type `CC_SHA256_CTX'. */ /* #undef HAVE_CC_SHA256_CTX */ @@ -283,8 +285,10 @@ /* Define to 1 if you have the <sys/byteorder.h> header file. */ /* #undef HAVE_SYS_BYTEORDER_H */ +#ifndef WITHOUT_CAPSICUM /* Define to 1 if you have the <sys/capsicum.h> header file. */ #define HAVE_SYS_CAPSICUM_H 1 +#endif /* Define to 1 if you have the <sys/endian.h> header file. */ /* #undef HAVE_SYS_ENDIAN_H */ diff --git a/usr.bin/xz/Makefile b/usr.bin/xz/Makefile index f7687116c8fd..e3cbafb0ebc3 100644 --- a/usr.bin/xz/Makefile +++ b/usr.bin/xz/Makefile @@ -1,4 +1,4 @@ -# $FreeBSD$ +.include <src.opts.mk> PROG= xz @@ -43,6 +43,10 @@ CFLAGS+= -DHAVE_CONFIG_H \ -I${LZMALIBDIR} \ -I${XZDIR}/common +.if ${MK_CAPSICUM} == "no" +CFLAGS+= -DWITHOUT_CAPSICUM +.endif + LIBADD= lzma .include <bsd.prog.mk>