sandbox: use the lowercase name for configuration

master
Michael Santos 7 years ago
parent f0092fd58a
commit ec32315684

@ -9,30 +9,31 @@ ifeq ($(UNAME_SYS), Linux)
CFLAGS ?= -D_FORTIFY_SOURCE=2 -O2 -fstack-protector \
--param=ssp-buffer-size=4 -Wformat -Werror=format-security \
-fno-strict-aliasing
XMPPIPE_SANDBOX ?= XMPPIPE_SANDBOX_SECCOMP
XMPPIPE_SANDBOX ?= seccomp
XMPPIPE_SANDBOX_RLIMIT_NOFILE ?= 0
else ifeq ($(UNAME_SYS), FreeBSD)
CFLAGS ?= -DHAVE_STRTONUM \
-D_FORTIFY_SOURCE=2 -O2 -fstack-protector \
--param=ssp-buffer-size=4 -Wformat -Werror=format-security \
-fno-strict-aliasing
XMPPIPE_SANDBOX ?= XMPPIPE_SANDBOX_CAPSICUM
XMPPIPE_SANDBOX ?= capsicum
else ifeq ($(UNAME_SYS), OpenBSD)
XMPPIPE_SANDBOX ?= XMPPIPE_SANDBOX_PLEDGE
CFLAGS ?= -DHAVE_STRTONUM \
-D_FORTIFY_SOURCE=2 -O2 -fstack-protector \
--param=ssp-buffer-size=4 -Wformat -Werror=format-security \
-fno-strict-aliasing
XMPPIPE_SANDBOX ?= pledge
else ifeq ($(UNAME_SYS), SunOS)
else ifeq ($(UNAME_SYS), Darwin)
endif
XMPPIPE_SANDBOX ?= XMPPIPE_SANDBOX_RLIMIT
XMPPIPE_SANDBOX ?= rlimit
XMPPIPE_SANDBOX_RLIMIT_NOFILE ?= -1
XMPPIPE_CFLAGS ?= -g -Wall
CFLAGS += $(XMPPIPE_CFLAGS) \
-DXMPPIPE_SANDBOX=\"$(XMPPIPE_SANDBOX)\" -D$(XMPPIPE_SANDBOX) \
-DXMPPIPE_SANDBOX=\"$(XMPPIPE_SANDBOX)\" \
-DXMPPIPE_SANDBOX_$(XMPPIPE_SANDBOX) \
-DXMPPIPE_SANDBOX_RLIMIT_NOFILE=$(XMPPIPE_SANDBOX_RLIMIT_NOFILE)
LDFLAGS += $(XMPPIPE_LDFLAGS)

@ -83,12 +83,12 @@ default:
Selecting the sandbox can be done at compile time. For example, to use
the "rlimit" sandbox:
XMPPIPE_SANDBOX=XMPPIPE_SANDBOX_RLIMIT make
XMPPIPE_SANDBOX=rlimit make
If a sandbox is interfering with normal operation, please open an issue.
To disable the sandbox, compile using the "null" sandbox:
XMPPIPE_SANDBOX=XMPPIPE_SANDBOX_NULL make
XMPPIPE_SANDBOX=null make
Options
-------

@ -12,7 +12,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifdef XMPPIPE_SANDBOX_CAPSICUM
#ifdef XMPPIPE_SANDBOX_capsicum
#include <sys/types.h>
#include <sys/param.h>
#include <sys/time.h>

@ -12,7 +12,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifdef XMPPIPE_SANDBOX_NULL
#ifdef XMPPIPE_SANDBOX_null
#include "xmppipe.h"
int

@ -12,7 +12,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifdef XMPPIPE_SANDBOX_PLEDGE
#ifdef XMPPIPE_SANDBOX_pledge
#include <unistd.h>
#include "xmppipe.h"

@ -12,7 +12,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifdef XMPPIPE_SANDBOX_RLIMIT
#ifdef XMPPIPE_SANDBOX_rlimit
#include <sys/time.h>
#include <sys/resource.h>

@ -12,7 +12,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifdef XMPPIPE_SANDBOX_SECCOMP
#ifdef XMPPIPE_SANDBOX_seccomp
#include <stddef.h>
#include <errno.h>
#include <sys/syscall.h>

Loading…
Cancel
Save