Skip to content

Commit

Permalink
Disable sandboxing when building with WITHOUT_CAPSICUM.
Browse files Browse the repository at this point in the history
PR:		bin/269185
MFC after:	3 days
  • Loading branch information
delphij committed Jan 28, 2023
1 parent 050e4bc commit 8f02c0d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
4 changes: 4 additions & 0 deletions lib/liblzma/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down Expand Up @@ -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 */
Expand Down
6 changes: 5 additions & 1 deletion usr.bin/xz/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# $FreeBSD$
.include <src.opts.mk>

PROG= xz

Expand Down Expand Up @@ -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>

0 comments on commit 8f02c0d

Please sign in to comment.