Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1ee4025a authored by Paul Lawrence's avatar Paul Lawrence Committed by android-build-merger
Browse files

Merge "Make seccomp honor setenforce" am: c337e32b am: 071dcc02

am: fb350eb0

Change-Id: Id8d8c478d9e1d929d216286bbf0fbdc423018c17
parents 943d4e82 fb350eb0
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -233,6 +233,8 @@ LOCAL_C_INCLUDES += \
LOCAL_STATIC_LIBRARIES := \
    libgif \
    libseccomp_policy \
    libselinux \
    libcrypto \

LOCAL_SHARED_LIBRARIES := \
    libmemtrack \
+7 −0
Original line number Diff line number Diff line
@@ -17,9 +17,16 @@
#include "core_jni_helpers.h"
#include "JniConstants.h"
#include "utils/Log.h"
#include <selinux/selinux.h>

#include "seccomp_policy.h"

static void Seccomp_setPolicy(JNIEnv* /*env*/) {
    if (security_getenforce() == 0) {
        ALOGI("seccomp disabled by setenforce 0");
        return;
    }

    if (!set_seccomp_filter()) {
        ALOGE("Failed to set seccomp policy - killing");
        exit(1);